mirror of
https://github.com/Sani7/remote-ui.git
synced 2026-10-26 21:51:13 +01:00
Removes JSON constructor from UI elements
This fixes the error: clang:optin.cplusplus.VirtualCall When virtual methods are called during construction and destruction the polymorphism is restricted to the class that’s being constructed or destructed because the more derived contexts are either not yet initialized or already destructed.
This commit is contained in:
+2
-1
@@ -10,7 +10,8 @@ TEST(UI_label, to_from_json)
|
||||
EXPECT_EQ(j["fg_color"], "#000000FF");
|
||||
EXPECT_EQ(j["bg_color"], "#FFFFFFFF");
|
||||
|
||||
UI_label label2(j);
|
||||
UI_label label2;
|
||||
label2.from_json(j);
|
||||
EXPECT_EQ(label2.text(), "label_text");
|
||||
EXPECT_EQ(label2.fg_color(), Color(0, 0, 0));
|
||||
EXPECT_EQ(label2.bg_color(), Color(255, 255, 255));
|
||||
|
||||
Reference in New Issue
Block a user