]> code.bitgloo.com Git - clyne/gamedev2.git/commitdiff
render: use tab.get for strings
authorClyne Sullivan <clyne@bitgloo.com>
Tue, 3 Sep 2019 21:58:04 +0000 (17:58 -0400)
committerClyne Sullivan <clyne@bitgloo.com>
Tue, 3 Sep 2019 21:58:04 +0000 (17:58 -0400)
src/components/Render.hpp

index 3f1750fe786d462e574c6a3027dcedcbdedcfdf2..073cbdf125a1057c87f0a026b36ef61fd53a8356 100644 (file)
@@ -41,9 +41,9 @@ public:
             if (tab["visible"].get_type() == sol::type::boolean)
                 this->visible = tab["visible"];
             if (tab["texture"].get_type() == sol::type::string)
-                this->texture = Texture(static_cast<std::string>(tab["texture"]));
+                this->texture = Texture(tab.get<std::string>("texture"));
             if (tab["normal"].get_type() == sol::type::string)
-                this->normal = Texture(static_cast<std::string>(tab["normal"]));
+                this->normal = Texture(tab.get<std::string>("normal"));
             if (tab["flipx"].get_type() == sol::type::boolean)
                 this->flipX = tab["flipx"];
         } else {