Browse Source

resource: fix warning

Daniele Bartolini 3 years ago
parent
commit
e48ffda18f
1 changed files with 3 additions and 1 deletions
  1. 3 1
      src/resource/unit_compiler.cpp

+ 3 - 1
src/resource/unit_compiler.cpp

@@ -628,8 +628,10 @@ Buffer UnitCompiler::blob()
 		bw.write(_unit_parents[ii]);
 
 	for (u32 ii = 0; ii < array::size(_component_info); ++ii) {
+		const ComponentTypeData deffault_ctd(default_allocator());
+
 		const StringId32 type        = _component_info[ii]._type;
-		const ComponentTypeData &ctd = hash_map::get(_component_data, type, ComponentTypeData(default_allocator()));
+		const ComponentTypeData &ctd = hash_map::get(_component_data, type, deffault_ctd);
 
 		const Buffer &data           = ctd._data;
 		const Array<u32> &unit_index = ctd._unit_index;