Daniele Bartolini 10 лет назад
Родитель
Сommit
9dbdd299ae

+ 1 - 1
src/renderers/shader.cpp

@@ -42,7 +42,7 @@ namespace shader_resource
 	void compile(const char* path, CompileOptions& opts)
 	{
 		Buffer buf = opts.read(path);
-		JSONParser json(array::begin(buf));
+		JSONParser json(buf);
 		JSONElement root = json.root();
 
 		DynamicString vs_code2;

+ 1 - 1
src/resource/font_resource.cpp

@@ -31,7 +31,7 @@ namespace font_resource
 		static const uint32_t VERSION = 1;
 
 		Buffer buf = opts.read(path);
-		JSONParser json(array::begin(buf));
+		JSONParser json(buf);
 		JSONElement root = json.root();
 
 		Array<FontGlyphData> m_glyphs(default_allocator());

+ 1 - 1
src/resource/level_resource.cpp

@@ -183,7 +183,7 @@ namespace level_resource
 		static const uint32_t VERSION = 1;
 
 		Buffer buf = opts.read(path);
-		JSONParser json(array::begin(buf));
+		JSONParser json(buf);
 		JSONElement root = json.root();
 
 		Array<LevelUnit> units(default_allocator());

+ 1 - 1
src/resource/material_resource.cpp

@@ -150,7 +150,7 @@ namespace material_resource
 		static const uint32_t VERSION = 1;
 
 		Buffer buf = opts.read(path);
-		JSONParser json(array::begin(buf));
+		JSONParser json(buf);
 		JSONElement root = json.root();
 
 		Array<TextureData> texdata(default_allocator());

+ 1 - 1
src/resource/mesh_resource.cpp

@@ -36,7 +36,7 @@ namespace mesh_resource
 		static const uint32_t VERSION = 1;
 
 		Buffer buf = opts.read(path);
-		JSONParser json(array::begin(buf));
+		JSONParser json(buf);
 		JSONElement root = json.root();
 
 		// Read data arrays

+ 1 - 1
src/resource/package_resource.cpp

@@ -20,7 +20,7 @@ namespace package_resource
 		static const uint32_t VERSION = 1;
 
 		Buffer buf = opts.read(path);
-		JSONParser json(array::begin(buf));
+		JSONParser json(buf);
 		JSONElement root = json.root();
 
 		JSONElement texture  = root.key_or_nil("texture");

+ 2 - 2
src/resource/physics_resource.cpp

@@ -228,7 +228,7 @@ namespace physics_resource
 		static const uint32_t VERSION = 1;
 
 		Buffer buf = opts.read(path);
-		JSONParser json(array::begin(buf));
+		JSONParser json(buf);
 		JSONElement root = json.root();
 
 		bool m_has_controller = false;
@@ -591,7 +591,7 @@ namespace physics_config_resource
 		static const uint32_t VERSION = 1;
 
 		Buffer buf = opts.read(path);
-		JSONParser json(array::begin(buf));
+		JSONParser json(buf);
 		JSONElement root = json.root();
 
 		typedef Map<DynamicString, uint32_t> FilterMap;

+ 1 - 1
src/resource/sound_resource.cpp

@@ -35,7 +35,7 @@ namespace sound_resource
 		const uint32_t VERSION = 1;
 
 		Buffer buf = opts.read(path);
-		JSONParser json(array::begin(buf));
+		JSONParser json(buf);
 		JSONElement root = json.root();
 
 		DynamicString name;

+ 2 - 2
src/resource/sprite_resource.cpp

@@ -46,7 +46,7 @@ namespace sprite_resource
 		static const uint32_t VERSION = 1;
 
 		Buffer buf = opts.read(path);
-		JSONParser json(array::begin(buf));
+		JSONParser json(buf);
 		JSONElement root = json.root();
 
 		// Read width/height
@@ -201,7 +201,7 @@ namespace sprite_animation_resource
 		static const uint32_t VERSION = 1;
 
 		Buffer buf = opts.read(path);
-		JSONParser json(array::begin(buf));
+		JSONParser json(buf);
 		JSONElement root = json.root();
 
 		Array<SpriteAnimationName> anim_names(default_allocator());

+ 1 - 1
src/resource/texture_resource.cpp

@@ -561,7 +561,7 @@ namespace texture_resource
 		static const uint32_t VERSION = 1;
 
 		Buffer buf = opts.read(path);
-		JSONParser json(array::begin(buf));
+		JSONParser json(buf);
 		JSONElement root = json.root();
 
 		DynamicString name;

+ 1 - 1
src/resource/unit_resource.cpp

@@ -242,7 +242,7 @@ namespace unit_resource
 		static const uint32_t VERSION = 1;
 
 		Buffer buf = opts.read(path);
-		JSONParser json(array::begin(buf));
+		JSONParser json(buf);
 		JSONElement root = json.root();
 
 		ResourceId				m_physics_resource;