Suppress msvc warnings.

Fixes: https://github.com/boostorg/regex/issues/80
This commit is contained in:
jzmaddock committed 2020-01-20 19:51:46 +00:00
1 parent 3b98dc901a
commit 2cd947f7c4
19 files changed
+150 -28

No files matched your search

+13 -8
View File
@@ -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
{