Skip to content

Commit df7c619

Browse files
Fix warnings (CXX17 DEPRACATED - just ignore it) (#5)
1 parent c086858 commit df7c619

File tree

4 files changed

+8
-3
lines changed

4 files changed

+8
-3
lines changed

CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ set( CMAKE_CXX_STANDARD 23 )
55

66
add_definitions( -DIFCQUERY_STATIC_LIB )
77

8+
add_definitions( -D_SILENCE_ALL_CXX17_DEPRECATION_WARNINGS )
9+
add_definitions( -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS )
10+
811
file( GLOB_RECURSE IFC_HEADERS include/ifcpp/Ifc *.h )
912
file( GLOB_RECURSE IFC_SOURCES src/Ifc *.cpp )
1013

include/ifcpp/Geometry/ProfileConverter.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -343,9 +343,9 @@ class ProfileConverter {
343343
const auto tw = (float)i_shape->m_WebThickness->m_value;
344344
const auto tf = (float)i_shape->m_FlangeThickness->m_value;
345345
const auto fillet_radius = (float)i_shape->m_FilletRadius->m_value;
346-
const auto flange_edge_radius = 0.0f;
346+
auto flange_edge_radius = 0.0f;
347347
if( i_shape->m_FlangeEdgeRadius ) {
348-
(float)i_shape->m_FlangeEdgeRadius->m_value;
348+
flange_edge_radius = (float)i_shape->m_FlangeEdgeRadius->m_value;
349349
}
350350
TPath result;
351351

src/Model/BuildingModel.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,8 @@ std::string getIfcSchemaVersionString(BuildingModel::SchemaVersionEnum version)
8888
case BuildingModel::IFC4: return "IFC4";
8989
case BuildingModel::IFC4X1: return "IFC4X1";
9090
case BuildingModel::IFC4X3: return "IFC4X3";
91+
case BuildingModel::IFC_VERSION_UNDEFINED:
92+
case BuildingModel::IFC_VERSION_UNKNOWN: return "IFC_VERSION_UNDEFINED";
9193
}
9294
return "IFC_VERSION_UNDEFINED";
9395
};

src/Writer/WriterUtil.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ std::string encodeStepString( const std::string& str )
227227
{
228228
int value = static_cast<int>(append_char);
229229
char temporary[8];
230-
sprintf( temporary, "%04X", value );
230+
snprintf( temporary, 8, "%04X", value );
231231

232232
if( !hasOpenedUnicodeTag )
233233
{

0 commit comments

Comments
 (0)