You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks
Which means that reduz' beloved style which we all became used to will now be changed automatically to remove the first empty line. This makes us lean closer to 1TBS (the one true brace style) instead of hybridating it with some Allman-inspired spacing. There's still the case of braces around single-statement blocks that needs to be addressed (but clang-format can't help with that, but clang-tidy may if we agree about it). Part of #33027.
This commit is contained in:
@@ -42,7 +42,6 @@
|
||||
Performance *Performance::singleton = nullptr;
|
||||
|
||||
void Performance::_bind_methods() {
|
||||
|
||||
ClassDB::bind_method(D_METHOD("get_monitor", "monitor"), &Performance::get_monitor);
|
||||
|
||||
BIND_ENUM_CONSTANT(TIME_FPS);
|
||||
@@ -85,7 +84,6 @@ float Performance::_get_node_count() const {
|
||||
}
|
||||
|
||||
String Performance::get_monitor_name(Monitor p_monitor) const {
|
||||
|
||||
ERR_FAIL_INDEX_V(p_monitor, MONITOR_MAX, String());
|
||||
static const char *names[MONITOR_MAX] = {
|
||||
|
||||
@@ -123,7 +121,6 @@ String Performance::get_monitor_name(Monitor p_monitor) const {
|
||||
}
|
||||
|
||||
float Performance::get_monitor(Monitor p_monitor) const {
|
||||
|
||||
switch (p_monitor) {
|
||||
case TIME_FPS:
|
||||
return Engine::get_singleton()->get_frames_per_second();
|
||||
@@ -226,17 +223,14 @@ Performance::MonitorType Performance::get_monitor_type(Monitor p_monitor) const
|
||||
}
|
||||
|
||||
void Performance::set_process_time(float p_pt) {
|
||||
|
||||
_process_time = p_pt;
|
||||
}
|
||||
|
||||
void Performance::set_physics_process_time(float p_pt) {
|
||||
|
||||
_physics_process_time = p_pt;
|
||||
}
|
||||
|
||||
Performance::Performance() {
|
||||
|
||||
_process_time = 0;
|
||||
_physics_process_time = 0;
|
||||
singleton = this;
|
||||
|
||||
Reference in New Issue
Block a user