summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id>2023-04-11 15:02:45 +0800
committerꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id>2023-04-11 15:02:45 +0800
commit57b7dd2de2bb96c2956f8d6718d1af24f759c3fa (patch)
tree5e232e9ee2206f3ad648e5efad58f66b830e4a79
parent06e7f31bcd8dc86daaa690d3356b3b54e3391da9 (diff)
It should have been override
-rw-r--r--Bootstrap.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/Bootstrap.cxx b/Bootstrap.cxx
index c515e34..7c7f686 100644
--- a/Bootstrap.cxx
+++ b/Bootstrap.cxx
@@ -1,12 +1,12 @@
#include "tomlc99/toml.h"
#include "Bootstrap.hxx"
-#define APPEND_COLORS(A, B) \
+#define OVERRIDE_COLORS(A, B) \
colors = toml_array_in(bootstrap, A);\
if (colors) for (int i = 0; ; i++) {\
auto color = toml_string_at(colors, i);\
if (!color.ok) break;\
- B.append(QColor{color.u.s});\
+ B[i] = QColor{color.u.s};\
free(color.u.s);\
}
@@ -33,9 +33,9 @@ Bootstrap::Bootstrap(QObject *parent):
if (mode.ok) bsMode = static_cast<Mode>(mode.u.i);
toml_array_t *colors;
- APPEND_COLORS("BodyColors", bodyColors);
- APPEND_COLORS("BodyBgs", bodyBgs);
- APPEND_COLORS("BorderColors", borderColors);
+ OVERRIDE_COLORS("BodyColors", bodyColors);
+ OVERRIDE_COLORS("BodyBgs", bodyBgs);
+ OVERRIDE_COLORS("BorderColors", borderColors);
toml_free(toml);
}