We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
narrow
1 parent 5bfe4c6 commit a4ba88bCopy full SHA for a4ba88b
src/util/string_utils.cpp
@@ -9,7 +9,6 @@ Author: Daniel Poetzl
9
#include "string_utils.h"
10
#include "exception_utils.h"
11
#include "invariant.h"
12
-#include "narrow.h"
13
14
#include <algorithm>
15
#include <cassert>
@@ -157,7 +156,7 @@ std::string escape_non_alnum(const std::string &to_escape)
157
156
std::ostringstream escaped;
158
for(auto &ch : to_escape)
159
{
160
- const auto uch = narrow<int>(narrow_cast<unsigned char>(ch));
+ const int uch{static_cast<unsigned char>(ch)};
161
if(ch == '_')
162
escaped << "__";
163
else if(isalnum(uch))
0 commit comments