Browse Source

Fix compiler error.
Removing unused helper object.

Sam Jaffe 6 years ago
parent
commit
8b6035ed72
2 changed files with 3 additions and 20 deletions
  1. 1 1
      graphics/include/game/graphics/object.hpp
  2. 2 19
      graphics/src/texture.cpp

+ 1 - 1
graphics/include/game/graphics/object.hpp

@@ -21,7 +21,7 @@ namespace graphics {
 
   struct object {
     bound location;
-    math::quad points;
+    math::dim2::quad points;
     material material;
     bound frame;
   }; // size:56, align:4

+ 2 - 19
graphics/src/texture.cpp

@@ -9,34 +9,17 @@
 
 #include "scope_guard/scope_guard.hpp"
 
-#include <string>
-#include <unordered_map>
-
 #pragma clang diagnostic push
 #pragma clang diagnostic ignored "-Wcomma"
 #define STB_IMAGE_IMPLEMENTATION
 #include "stb/stb_image.h"
 #pragma clang diagnostic pop
 
+#include "helper.hpp"
+
 unsigned char * stbi_load(char const *, int *, int *, int *, int);
 void stbi_image_free(void *);
 
-template <typename T, typename Key = std::string> class private_factory {
-public:
-  using key_t = Key;
-
-  template <typename... Args> static T create(key_t const & key) {
-    auto found = instances.find(key);
-    if (found == instances.end()) {
-      found = instances.emplace(key, T::create(key)).first;
-    }
-    return found->second;
-  }
-
-private:
-  static std::unordered_map<key_t, T> instances;
-};
-
 namespace graphics { namespace detail { namespace texture {
   struct format {};