Skip to content

Commit

Permalink
[RFR] : fix many warnings with MSVC and CLANG
Browse files Browse the repository at this point in the history
  • Loading branch information
aiekick committed Mar 18, 2024
1 parent bbf5bf6 commit df0e4b4
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion include/ctools/GLVersionChecker.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ SOFTWARE.
#pragma once
#pragma warning(disable : 4251)

#include "cTools.h"
#include <ctools/cTools.h>
#include <glad/glad.h>

#ifdef MSVC
Expand Down
12 changes: 7 additions & 5 deletions include/ctools/cTools.h
Original file line number Diff line number Diff line change
Expand Up @@ -1690,7 +1690,7 @@ using u64vec3 = vec3<uint64_t>;
CTOOLS_API inline bool valid(const fvec3& a) {
return floatIsValid(a.x) && floatIsValid(a.y) && floatIsValid(a.z);
}
// specialization for fvec2
// specialization for fvec3
CTOOLS_API inline bool operator==(const fvec3& v, const fvec3& f) {
return IS_FLOAT_EQUAL(f.x, v.x) && IS_FLOAT_EQUAL(f.y, v.y) && IS_FLOAT_EQUAL(f.z, v.z);
}
Expand Down Expand Up @@ -2098,17 +2098,19 @@ using u32vec4 = vec4<uint32_t>;
using u64vec4 = vec4<uint64_t>;

// specialization for float32 test to fvec4
CTOOLS_API inline bool valid(const fvec4& a) {
inline bool valid(const fvec4& a) {
return floatIsValid(a.x) && floatIsValid(a.y) && floatIsValid(a.z) && floatIsValid(a.w);
}

// specialization for fvec4
CTOOLS_API inline bool operator==(const fvec4& v, const fvec4& f) {
/*template <>
inline bool operator==(fvec4 v, fvec4 f) {
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);
}
CTOOLS_API inline bool operator!=(const fvec4& v, const fvec4& f) {
template <>
inline bool operator!=(fvec4 v, fvec4 f) {
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);
}
}*/

/////////////////////////////////////////////////////////////////////////
template <typename T>
Expand Down
1 change: 1 addition & 0 deletions src/GLVersionChecker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,7 @@ void OpenglInfosStruct::fill()
}

#ifdef IMGUI_INCLUDE
#include IMGUI_INCLUDE
void OpenglInfosStruct::drawImGui()
{
if (ImGui::BeginMenu("Opengl Infos"))
Expand Down

0 comments on commit df0e4b4

Please sign in to comment.