Pārlūkot izejas kodu

Make the JSON library ambiently available.

Par Winzell 7 gadi atpakaļ
vecāks
revīzija
2a4da70de0
3 mainītis faili ar 10 papildinājumiem un 9 dzēšanām
  1. 9 0
      src/FBX2glTF.h
  2. 1 1
      src/fbx/Fbx2Raw.cpp
  3. 0 8
      src/gltf/Raw2Gltf.hpp

+ 9 - 0
src/FBX2glTF.h

@@ -29,4 +29,13 @@
 
 #include "mathfu.hpp"
 
+// give all modules access to our tweaked JSON
+#include <json.hpp>
+#include <fifo_map.hpp>
+
+template<class K, class V, class ignore, class A>
+using workaround_fifo_map = nlohmann::fifo_map<K, V, nlohmann::fifo_map_compare<K>, A>;
+
+using json = nlohmann::basic_json<workaround_fifo_map>;
+
 extern bool verboseOutput;

+ 1 - 1
src/fbx/Fbx2Raw.cpp

@@ -19,7 +19,7 @@
 #include <cassert>
 #include <cmath>
 
-#include "gltf/Raw2Gltf.hpp"
+#include "FBX2glTF.h"
 
 #include "utils/File_Utils.hpp"
 #include "utils/String_Utils.hpp"

+ 0 - 8
src/gltf/Raw2Gltf.hpp

@@ -16,14 +16,6 @@
 #undef ERROR
 #include <draco/compression/encode.h>
 
-#include <json.hpp>
-#include <fifo_map.hpp>
-
-template<class K, class V, class ignore, class A>
-using workaround_fifo_map = nlohmann::fifo_map<K, V, nlohmann::fifo_map_compare<K>, A>;
-
-using json = nlohmann::basic_json<workaround_fifo_map>;
-
 #include "FBX2glTF.h"
 #include "raw/RawModel.hpp"