Skip to content

Commit 1ce8e5d

Browse files
committed
Fix Zenith compilation errors on linux
1 parent a8ac42f commit 1ce8e5d

File tree

1 file changed

+37
-46
lines changed

1 file changed

+37
-46
lines changed

Source/Scripting/Scripting/Zenith.h

Lines changed: 37 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -85,13 +85,6 @@ namespace Scripting
8585

8686
template <typename T>
8787
T GetGlobalField(const char* key);
88-
template<> bool GetGlobalField<bool>(const char* key);
89-
template<> i32 GetGlobalField<i32>(const char* key);
90-
template<> u32 GetGlobalField<u32>(const char* key);
91-
template<> f32 GetGlobalField<f32>(const char* key);
92-
template<> f64 GetGlobalField<f64>(const char* key);
93-
template<> const char* GetGlobalField<const char*>(const char* key);
94-
template<> vec3 GetGlobalField<vec3>(const char* key);
9588

9689
void SetGlobalKey(const char* key);
9790
void AddGlobalField(const char* key, bool value);
@@ -159,29 +152,9 @@ namespace Scripting
159152

160153
template<typename T>
161154
T Get(i32 index);
162-
template<> bool Get<bool>(i32 index);
163-
template<> i32 Get<i32>(i32 index);
164-
template<> u32 Get<u32>(i32 index);
165-
template<> f32 Get<f32>(i32 index);
166-
template<> f64 Get<f64>(i32 index);
167-
template<> const char* Get<const char*>(i32 index);
168-
template<> vec3 Get<vec3>(i32 index);
169155

170156
template<typename T>
171157
T CheckVal(i32 index);
172-
template<> bool CheckVal<bool>(i32 index);
173-
template<> i8 CheckVal<i8>(i32 index);
174-
template<> i16 CheckVal<i16>(i32 index);
175-
template<> i32 CheckVal<i32>(i32 index);
176-
template<> i64 CheckVal<i64>(i32 index);
177-
template<> u8 CheckVal<u8>(i32 index);
178-
template<> u16 CheckVal<u16>(i32 index);
179-
template<> u32 CheckVal<u32>(i32 index);
180-
template<> u64 CheckVal<u64>(i32 index);
181-
template<> f32 CheckVal<f32>(i32 index);
182-
template<> f64 CheckVal<f64>(i32 index);
183-
template<> const char* CheckVal<const char*>(i32 index);
184-
template<> vec3 CheckVal<vec3>(i32 index);
185158

186159
template <typename T>
187160
T* GetUserData(T* fallback = nullptr, i32 index = -1)
@@ -503,26 +476,44 @@ namespace Scripting
503476
robin_hood::unordered_set<u32> loadedModuleHashes;
504477
};
505478

506-
template<>
507-
void Zenith::Push<vec2>(const vec2& value);
508479

509-
template<>
510-
void Zenith::Push<ivec2>(const ivec2& value);
511-
512-
template<>
513-
void Zenith::Push<uvec2>(const uvec2& value);
514-
515-
template<>
516-
void Zenith::Push<vec3>(const vec3& value);
517-
518-
template<>
519-
void Zenith::Push<ivec3>(const ivec3& value);
520-
521-
template<>
522-
void Zenith::Push<uvec3>(const uvec3& value);
523-
524-
template<>
525-
void Zenith::Push<::std::string>(const ::std::string& value);
480+
template<> bool Zenith::GetGlobalField<bool>(const char* key);
481+
template<> i32 Zenith::GetGlobalField<i32>(const char* key);
482+
template<> u32 Zenith::GetGlobalField<u32>(const char* key);
483+
template<> f32 Zenith::GetGlobalField<f32>(const char* key);
484+
template<> f64 Zenith::GetGlobalField<f64>(const char* key);
485+
template<> const char* Zenith::GetGlobalField<const char*>(const char* key);
486+
template<> vec3 Zenith::GetGlobalField<vec3>(const char* key);
487+
488+
template<> void Zenith::Push<vec2>(const vec2& value);
489+
template<> void Zenith::Push<ivec2>(const ivec2& value);
490+
template<> void Zenith::Push<uvec2>(const uvec2& value);
491+
template<> void Zenith::Push<vec3>(const vec3& value);
492+
template<> void Zenith::Push<ivec3>(const ivec3& value);
493+
template<> void Zenith::Push<uvec3>(const uvec3& value);
494+
template<> void Zenith::Push<::std::string>(const ::std::string& value);
495+
496+
template<> bool Zenith::Get<bool>(i32 index);
497+
template<> i32 Zenith::Get<i32>(i32 index);
498+
template<> u32 Zenith::Get<u32>(i32 index);
499+
template<> f32 Zenith::Get<f32>(i32 index);
500+
template<> f64 Zenith::Get<f64>(i32 index);
501+
template<> const char* Zenith::Get<const char*>(i32 index);
502+
template<> vec3 Zenith::Get<vec3>(i32 index);
503+
504+
template<> bool Zenith::CheckVal<bool>(i32 index);
505+
template<> i8 Zenith::CheckVal<i8>(i32 index);
506+
template<> i16 Zenith::CheckVal<i16>(i32 index);
507+
template<> i32 Zenith::CheckVal<i32>(i32 index);
508+
template<> i64 Zenith::CheckVal<i64>(i32 index);
509+
template<> u8 Zenith::CheckVal<u8>(i32 index);
510+
template<> u16 Zenith::CheckVal<u16>(i32 index);
511+
template<> u32 Zenith::CheckVal<u32>(i32 index);
512+
template<> u64 Zenith::CheckVal<u64>(i32 index);
513+
template<> f32 Zenith::CheckVal<f32>(i32 index);
514+
template<> f64 Zenith::CheckVal<f64>(i32 index);
515+
template<> const char* Zenith::CheckVal<const char*>(i32 index);
516+
template<> vec3 Zenith::CheckVal<vec3>(i32 index);
526517
}
527518

528519
namespace std

0 commit comments

Comments
 (0)