Remove re namespace alias

This alias is a legacy from when we were using Boost.Regexp to
workaround a broken implementation in GCC's libstdc++ earlier than 4.9.
directional-lights
Nicolas Hake 2016-07-21 19:47:46 +02:00
parent a188500609
commit b2d5164a0f
3 changed files with 5 additions and 8 deletions

View File

@ -44,7 +44,6 @@ don't need to include this file or any of the files it includes. */
#include <cctype>
#include <cerrno>
#include <climits>
#include <cmath>
#include <cstdarg>
#include <cstddef>
@ -56,6 +55,7 @@ don't need to include this file or any of the files it includes. */
#include <list>
#include <map>
#include <memory>
#include <regex>
#include <set>
#include <sstream>
#include <stdexcept>
@ -63,9 +63,6 @@ don't need to include this file or any of the files it includes. */
#include <utility>
#include <vector>
#include <regex>
namespace re = std;
#include "lib/Standard.h"
#include "C4Prototypes.h"
#include "lib/C4Real.h"

View File

@ -257,7 +257,7 @@ namespace
// the beginning or end of a line, respectively, and it seems
// like in some implementations they only match the beginning
// or end of the whole string. See also #1127.
static re::regex line_pattern("(?:\n|^)([^=]+)=(.*?)\r?(?=\n|$)", static_cast<re::regex::flag_type>(re::regex_constants::optimize | re::regex_constants::ECMAScript));
static std::regex line_pattern("(?:\n|^)([^=]+)=(.*?)\r?(?=\n|$)", static_cast<std::regex::flag_type>(std::regex_constants::optimize | std::regex_constants::ECMAScript));
assert(stringtbl);
if (!stringtbl)
@ -269,7 +269,7 @@ namespace
const char *begin = stringtbl;
const char *end = begin + std::char_traits<char>::length(begin);
for (auto it = re::cregex_iterator(begin, end, line_pattern); it != re::cregex_iterator(); ++it)
for (auto it = std::cregex_iterator(begin, end, line_pattern); it != std::cregex_iterator(); ++it)
{
assert(it->size() == 3);
if (it->size() != 3)

View File

@ -218,7 +218,7 @@ bool C4TextureMap::LoadFlags(C4Group &hGroup, const char *szEntryName, bool *pOv
int32_t C4TextureMap::LoadMap(C4Group &hGroup, const char *szEntryName, bool *pOverloadMaterials, bool *pOverloadTextures)
{
static re::regex line_terminator("\r?\n", static_cast<re::regex::flag_type>(re::regex_constants::optimize | re::regex_constants::ECMAScript));
static std::regex line_terminator("\r?\n", static_cast<std::regex::flag_type>(std::regex_constants::optimize | std::regex_constants::ECMAScript));
char *bpMap;
size_t map_size;
@ -230,7 +230,7 @@ int32_t C4TextureMap::LoadMap(C4Group &hGroup, const char *szEntryName, bool *pO
char *end = begin + map_size;
size_t line = 1; // Counter for error messages
for (auto it = re::cregex_token_iterator(begin, end, line_terminator, -1); it != re::cregex_token_iterator(); ++it, ++line)
for (auto it = std::cregex_token_iterator(begin, end, line_terminator, -1); it != std::cregex_token_iterator(); ++it, ++line)
{
if (it->compare("OverloadMaterials") == 0)
{