Skip to content

Commit df0e4b4

Browse files
committed
[RFR] : fix many warnings with MSVC and CLANG
1 parent bbf5bf6 commit df0e4b4

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

include/ctools/GLVersionChecker.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ SOFTWARE.
2424
#pragma once
2525
#pragma warning(disable : 4251)
2626

27-
#include "cTools.h"
27+
#include <ctools/cTools.h>
2828
#include <glad/glad.h>
2929

3030
#ifdef MSVC

include/ctools/cTools.h

+7-5
Original file line numberDiff line numberDiff line change
@@ -1690,7 +1690,7 @@ using u64vec3 = vec3<uint64_t>;
16901690
CTOOLS_API inline bool valid(const fvec3& a) {
16911691
return floatIsValid(a.x) && floatIsValid(a.y) && floatIsValid(a.z);
16921692
}
1693-
// specialization for fvec2
1693+
// specialization for fvec3
16941694
CTOOLS_API inline bool operator==(const fvec3& v, const fvec3& f) {
16951695
return IS_FLOAT_EQUAL(f.x, v.x) && IS_FLOAT_EQUAL(f.y, v.y) && IS_FLOAT_EQUAL(f.z, v.z);
16961696
}
@@ -2098,17 +2098,19 @@ using u32vec4 = vec4<uint32_t>;
20982098
using u64vec4 = vec4<uint64_t>;
20992099

21002100
// specialization for float32 test to fvec4
2101-
CTOOLS_API inline bool valid(const fvec4& a) {
2101+
inline bool valid(const fvec4& a) {
21022102
return floatIsValid(a.x) && floatIsValid(a.y) && floatIsValid(a.z) && floatIsValid(a.w);
21032103
}
21042104

21052105
// specialization for fvec4
2106-
CTOOLS_API inline bool operator==(const fvec4& v, const fvec4& f) {
2106+
/*template <>
2107+
inline bool operator==(fvec4 v, fvec4 f) {
21072108
return IS_FLOAT_EQUAL(f.x, v.x) && IS_FLOAT_EQUAL(f.y, v.y) && IS_FLOAT_EQUAL(f.z, v.z) && IS_FLOAT_EQUAL(f.w, v.w);
21082109
}
2109-
CTOOLS_API inline bool operator!=(const fvec4& v, const fvec4& f) {
2110+
template <>
2111+
inline bool operator!=(fvec4 v, fvec4 f) {
21102112
return IS_FLOAT_DIFFERENT(f.x, v.x) || IS_FLOAT_DIFFERENT(f.y, v.y) || IS_FLOAT_DIFFERENT(f.z, v.z) || IS_FLOAT_DIFFERENT(f.w, v.w);
2111-
}
2113+
}*/
21122114

21132115
/////////////////////////////////////////////////////////////////////////
21142116
template <typename T>

src/GLVersionChecker.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,7 @@ void OpenglInfosStruct::fill()
240240
}
241241

242242
#ifdef IMGUI_INCLUDE
243+
#include IMGUI_INCLUDE
243244
void OpenglInfosStruct::drawImGui()
244245
{
245246
if (ImGui::BeginMenu("Opengl Infos"))

0 commit comments

Comments
 (0)