mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-06 07:51:47 +00:00
IfcException.h: suppress C4275 warnings
This commit is contained in:
@@ -66,7 +66,8 @@ if (BUILD_SHARED_LIBS)
|
|||||||
add_definitions(-DBUILD_SHARED_LIBS)
|
add_definitions(-DBUILD_SHARED_LIBS)
|
||||||
if (MSVC)
|
if (MSVC)
|
||||||
message(WARNING "Building DLLs against the static VC run-time. This is not recommended if the DLLs are to be redistributed.")
|
message(WARNING "Building DLLs against the static VC run-time. This is not recommended if the DLLs are to be redistributed.")
|
||||||
# There will be couple hundreds of these so suppress them away.
|
# C4521: 'identifier' : class 'type' needs to have dll-interface to be used by clients of class 'type2'
|
||||||
|
# There will be couple hundreds of these so suppress them away, https://msdn.microsoft.com/en-us/library/esew7y1w.aspx
|
||||||
add_definitions(-wd4251)
|
add_definitions(-wd4251)
|
||||||
endif()
|
endif()
|
||||||
set(IFCDIRS "${LIBDIR}")
|
set(IFCDIRS "${LIBDIR}")
|
||||||
|
|||||||
@@ -25,6 +25,13 @@
|
|||||||
#include <exception>
|
#include <exception>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
// "C4275 can be ignored in Visual C++ if you are deriving from a type in the Standard C++ Library",
|
||||||
|
// https://msdn.microsoft.com/en-us/library/3tdb471s.aspx
|
||||||
|
#pragma warning(push)
|
||||||
|
#pragma warning(disable : 4275)
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace IfcParse {
|
namespace IfcParse {
|
||||||
class IfcParse_EXPORT IfcException : public std::exception {
|
class IfcParse_EXPORT IfcException : public std::exception {
|
||||||
private:
|
private:
|
||||||
@@ -38,7 +45,7 @@ namespace IfcParse {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
class IfcAttributeOutOfRangeException : public IfcException {
|
class IfcParse_EXPORT IfcAttributeOutOfRangeException : public IfcException {
|
||||||
public:
|
public:
|
||||||
IfcAttributeOutOfRangeException(const std::string& e)
|
IfcAttributeOutOfRangeException(const std::string& e)
|
||||||
: IfcException(e) {}
|
: IfcException(e) {}
|
||||||
@@ -46,4 +53,8 @@ namespace IfcParse {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
#pragma warning(pop)
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user