summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHugo Locurcio <hugo.locurcio@hugo.pro>2020-04-04 14:27:44 +0200
committerHugo Locurcio <hugo.locurcio@hugo.pro>2020-04-04 14:27:44 +0200
commit5fae0c454a78a62249b2d8af433b401daed42600 (patch)
tree4384545df5a891f2a58b66a7ece6871b01735f4c
parentea48b403a9e7b8ddb2b814c6ea413bb9f5ed0518 (diff)
downloadredot-engine-5fae0c454a78a62249b2d8af433b401daed42600.tar.gz
Improve the shader error console output
This makes the line gutter look more like an actual line gutter, which makes it less confusing.
-rw-r--r--core/ustring.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/ustring.cpp b/core/ustring.cpp
index e56f177103..fbe3fcb1b2 100644
--- a/core/ustring.cpp
+++ b/core/ustring.cpp
@@ -647,13 +647,13 @@ String String::camelcase_to_underscore(bool lowercase) const {
}
String String::get_with_code_lines() const {
- Vector<String> lines = split("\n");
+ const Vector<String> lines = split("\n");
String ret;
for (int i = 0; i < lines.size(); i++) {
if (i > 0) {
ret += "\n";
}
- ret += itos(i + 1) + " " + lines[i];
+ ret += vformat("%4d | %s", i + 1, lines[i]);
}
return ret;
}