summaryrefslogtreecommitdiff
path: root/scene/main/scene_tree.h
diff options
context:
space:
mode:
authorHugo Locurcio <hugo.locurcio@hugo.pro>2019-12-29 16:39:24 +0100
committerHugo Locurcio <hugo.locurcio@hugo.pro>2020-01-03 11:41:46 +0100
commitcc626acf45c305ffa1bf98013a6bfcb767d703d4 (patch)
treee2c1604acb07eefe0aa7a67559832cc56ede6629 /scene/main/scene_tree.h
parent9d3424f61ddd1e6bec78381aa4a0c6acec53d290 (diff)
Add a shorthand for setting the exit code using `SceneTree::quit()`
This reduces the amount of code required to exit a process with a non-zero exit code. This pattern is also found in most other programming languages.
Diffstat (limited to 'scene/main/scene_tree.h')
-rw-r--r--scene/main/scene_tree.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/main/scene_tree.h b/scene/main/scene_tree.h
index 9bb24238f2..55304fb12d 100644
--- a/scene/main/scene_tree.h
+++ b/scene/main/scene_tree.h
@@ -303,7 +303,7 @@ public:
void set_auto_accept_quit(bool p_enable);
void set_quit_on_go_back(bool p_enable);
- void quit();
+ void quit(int p_exit_code = -1);
void set_input_as_handled();
bool is_input_handled();