Skip to content

Commit ff94646

Browse files
authored
simplecpp.h: push and pop the MSVC warning disabling #pragma so they don't spill into user code (#306)
1 parent f5a5679 commit ff94646

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

simplecpp.h

+5
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
#endif
4646

4747
#if defined(_MSC_VER)
48+
# pragma warning(push)
4849
// suppress warnings about "conversion from 'type1' to 'type2', possible loss of data"
4950
# pragma warning(disable : 4267)
5051
# pragma warning(disable : 4244)
@@ -370,6 +371,10 @@ namespace simplecpp {
370371
SIMPLECPP_LIB std::string getCppStdString(const std::string &std);
371372
}
372373

374+
#if defined(_MSC_VER)
375+
# pragma warning(pop)
376+
#endif
377+
373378
#if (__cplusplus < 201103L) && !defined(__APPLE__)
374379
#undef nullptr
375380
#endif

0 commit comments

Comments
 (0)