MSVC: Fix compiler warnings

* avoid redefines in Assembly
* explicit cast from size_t to int
* remove unused variables
* avoid implicit cast from double to float
* in test cases replace EXPECT_FLOAT_EQ with EXPECT_DOUBLE_EQ or EXPECT_NEAR when doubles are used
This commit is contained in:
wmayer
2024-06-20 17:41:02 +02:00
committed by Chris Hennes
parent d2be7f7d89
commit 2f8382ae59
9 changed files with 70 additions and 64 deletions

View File

@@ -72,6 +72,11 @@ SET(AssemblyGuiIcon_SVG
)
add_library(AssemblyGui SHARED ${AssemblyGui_SRCS} ${AssemblyGuiIcon_SVG})
if(WIN32)
target_compile_definitions(AssemblyGui PRIVATE _USE_MATH_DEFINES)
endif(WIN32)
target_link_libraries(AssemblyGui ${AssemblyGui_LIBS})
if (FREECAD_WARN_ERROR)
target_compile_warn_error(AssemblyGui)

View File

@@ -21,8 +21,8 @@
* *
***************************************************************************/
#ifndef POINTSGUI_PRECOMPILED_H
#define POINTSGUI_PRECOMPILED_H
#ifndef ASSEMBLYGUI_PRECOMPILED_H
#define ASSEMBLYGUI_PRECOMPILED_H
#include <FCConfig.h>
@@ -30,6 +30,7 @@
// STL
#include <algorithm>
#include <cmath>
#include <limits>
#include <memory>
@@ -53,4 +54,4 @@
#endif //_PreComp_
#endif // POINTSGUI_PRECOMPILED_H
#endif // ASSEMBLYGUI_PRECOMPILED_H