mirror of
https://github.com/boostorg/regex.git
synced 2025-07-29 03:57:27 +02:00
Suppress msvc warnings.
Fixes: https://github.com/boostorg/regex/issues/80
This commit is contained in:
@ -70,6 +70,10 @@ inline std::string to_string(const char* i, const char* j)
|
||||
}
|
||||
namespace BOOST_REGEX_DETAIL_NS{
|
||||
|
||||
#ifdef BOOST_MSVC
|
||||
# pragma warning(push)
|
||||
#pragma warning(disable:26812)
|
||||
#endif
|
||||
class RegExData
|
||||
{
|
||||
public:
|
||||
@ -103,6 +107,9 @@ public:
|
||||
#endif
|
||||
strings(), positions() {}
|
||||
};
|
||||
#ifdef BOOST_MSVC
|
||||
# pragma warning(pop)
|
||||
#endif
|
||||
|
||||
void RegExData::update()
|
||||
{
|
||||
|
@ -112,16 +112,21 @@ void mapfile::open(const char* file)
|
||||
std::runtime_error err("Unable to create file mapping.");
|
||||
boost::BOOST_REGEX_DETAIL_NS::raise_runtime_error(err);
|
||||
}
|
||||
_first = static_cast<const char*>(MapViewOfFile(hmap, FILE_MAP_READ, 0, 0, 0));
|
||||
if(_first == 0)
|
||||
else
|
||||
{
|
||||
CloseHandle(hmap);
|
||||
CloseHandle(hfile);
|
||||
hmap = 0;
|
||||
hfile = 0;
|
||||
std::runtime_error err("Unable to create file mapping.");
|
||||
_first = static_cast<const char*>(MapViewOfFile(hmap, FILE_MAP_READ, 0, 0, 0));
|
||||
if (_first == 0)
|
||||
{
|
||||
CloseHandle(hmap);
|
||||
CloseHandle(hfile);
|
||||
hmap = 0;
|
||||
hfile = 0;
|
||||
std::runtime_error err("Unable to create file mapping.");
|
||||
boost::BOOST_REGEX_DETAIL_NS::raise_runtime_error(err);
|
||||
}
|
||||
else
|
||||
_last = _first + GetFileSize(hfile, 0);
|
||||
}
|
||||
_last = _first + GetFileSize(hfile, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -66,6 +66,10 @@ const char* names[] = {
|
||||
|
||||
typedef boost::basic_regex<char, c_regex_traits<char> > c_regex_type;
|
||||
|
||||
#ifdef BOOST_MSVC
|
||||
# pragma warning(push)
|
||||
#pragma warning(disable:26812)
|
||||
#endif
|
||||
BOOST_REGEX_DECL int BOOST_REGEX_CCALL regcompA(regex_tA* expression, const char* ptr, int f)
|
||||
{
|
||||
#ifndef BOOST_NO_EXCEPTIONS
|
||||
@ -140,6 +144,9 @@ BOOST_REGEX_DECL int BOOST_REGEX_CCALL regcompA(regex_tA* expression, const char
|
||||
return result;
|
||||
|
||||
}
|
||||
#ifdef BOOST_MSVC
|
||||
# pragma warning(pop)
|
||||
#endif
|
||||
|
||||
BOOST_REGEX_DECL regsize_t BOOST_REGEX_CCALL regerrorA(int code, const regex_tA* e, char* buf, regsize_t buf_size)
|
||||
{
|
||||
|
@ -72,7 +72,7 @@ regex_error::regex_error(regex_constants::error_type err)
|
||||
{
|
||||
}
|
||||
|
||||
regex_error::~regex_error() throw()
|
||||
regex_error::~regex_error() BOOST_NOEXCEPT
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -76,6 +76,10 @@ const wchar_t* wnames[] = {
|
||||
|
||||
typedef boost::basic_regex<wchar_t, c_regex_traits<wchar_t> > wc_regex_type;
|
||||
|
||||
#ifdef BOOST_MSVC
|
||||
# pragma warning(push)
|
||||
#pragma warning(disable:26812)
|
||||
#endif
|
||||
BOOST_REGEX_DECL int BOOST_REGEX_CCALL regcompW(regex_tW* expression, const wchar_t* ptr, int f)
|
||||
{
|
||||
#ifndef BOOST_NO_EXCEPTIONS
|
||||
@ -150,6 +154,9 @@ BOOST_REGEX_DECL int BOOST_REGEX_CCALL regcompW(regex_tW* expression, const wcha
|
||||
return result;
|
||||
|
||||
}
|
||||
#ifdef BOOST_MSVC
|
||||
# pragma warning(pop)
|
||||
#endif
|
||||
|
||||
BOOST_REGEX_DECL regsize_t BOOST_REGEX_CCALL regerrorW(int code, const regex_tW* e, wchar_t* buf, regsize_t buf_size)
|
||||
{
|
||||
|
Reference in New Issue
Block a user