summaryrefslogtreecommitdiffstats
path: root/core/print_string.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2018-08-24 08:47:34 +0200
committerRémi Verschelde <rverschelde@gmail.com>2018-08-24 09:23:20 +0200
commitde59fe04e73250229e6ac11f9314e1b75dbdef1a (patch)
treefa99f0927da10719fb7a7e1e8fcce3a97d5fe08c /core/print_string.cpp
parent34e58fd831172bad1eebb748c97238c28864423a (diff)
downloadredot-engine-de59fe04e73250229e6ac11f9314e1b75dbdef1a.tar.gz
Add print_verbose to print to stdout only in verbose mode
Equivalent of the cumbersome: if (OS::get_singleton()->is_stdout_verbose()) print_line(msg);
Diffstat (limited to 'core/print_string.cpp')
-rw-r--r--core/print_string.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/core/print_string.cpp b/core/print_string.cpp
index 0355154488..e1e42d2b56 100644
--- a/core/print_string.cpp
+++ b/core/print_string.cpp
@@ -107,3 +107,10 @@ void print_error(String p_string) {
_global_unlock();
}
+
+void print_verbose(String p_string) {
+
+ if (OS::get_singleton()->is_stdout_verbose()) {
+ print_line(p_string);
+ }
+}