mirror of
https://github.com/tristanpenman/valijson.git
synced 2024-12-12 18:20:27 +01:00
Disable C4702: unreachable code warnings within relevant headers
This commit is contained in:
parent
4897d102bd
commit
855365bce0
@ -26,6 +26,11 @@
|
|||||||
#include <valijson/schema.hpp>
|
#include <valijson/schema.hpp>
|
||||||
#include <valijson/exceptions.hpp>
|
#include <valijson/exceptions.hpp>
|
||||||
|
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
#pragma warning( push )
|
||||||
|
#pragma warning( disable : 4702 )
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace valijson {
|
namespace valijson {
|
||||||
|
|
||||||
class ValidationResults;
|
class ValidationResults;
|
||||||
@ -1236,3 +1241,7 @@ public:
|
|||||||
|
|
||||||
} // namespace constraints
|
} // namespace constraints
|
||||||
} // namespace valijson
|
} // namespace valijson
|
||||||
|
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
#pragma warning( pop )
|
||||||
|
#endif
|
||||||
|
@ -13,6 +13,11 @@
|
|||||||
|
|
||||||
#include <valijson/utils/utf8_utils.hpp>
|
#include <valijson/utils/utf8_utils.hpp>
|
||||||
|
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
#pragma warning( push )
|
||||||
|
#pragma warning( disable : 4702 )
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace valijson {
|
namespace valijson {
|
||||||
|
|
||||||
class ValidationResults;
|
class ValidationResults;
|
||||||
@ -1152,10 +1157,6 @@ public:
|
|||||||
|
|
||||||
bool validated = true;
|
bool validated = true;
|
||||||
|
|
||||||
#ifdef VALIJSON_USE_EXCEPTIONS
|
|
||||||
try
|
|
||||||
#endif
|
|
||||||
{
|
|
||||||
const typename AdapterType::Array targetArray = m_target.asArray();
|
const typename AdapterType::Array targetArray = m_target.asArray();
|
||||||
const typename AdapterType::Array::const_iterator end = targetArray.end();
|
const typename AdapterType::Array::const_iterator end = targetArray.end();
|
||||||
const typename AdapterType::Array::const_iterator secondLast = --targetArray.end();
|
const typename AdapterType::Array::const_iterator secondLast = --targetArray.end();
|
||||||
@ -1177,12 +1178,7 @@ public:
|
|||||||
}
|
}
|
||||||
++outerIndex;
|
++outerIndex;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
#ifdef VALIJSON_USE_EXCEPTIONS
|
|
||||||
catch (...) {
|
|
||||||
throw;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
return validated;
|
return validated;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1790,3 +1786,7 @@ private:
|
|||||||
};
|
};
|
||||||
|
|
||||||
} // namespace valijson
|
} // namespace valijson
|
||||||
|
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
#pragma warning( pop )
|
||||||
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user