Skip to content

Commit a4ba88b

Browse files
committed
Remove usage of narrow for widening conversion
1 parent 5bfe4c6 commit a4ba88b

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/util/string_utils.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ Author: Daniel Poetzl
99
#include "string_utils.h"
1010
#include "exception_utils.h"
1111
#include "invariant.h"
12-
#include "narrow.h"
1312

1413
#include <algorithm>
1514
#include <cassert>
@@ -157,7 +156,7 @@ std::string escape_non_alnum(const std::string &to_escape)
157156
std::ostringstream escaped;
158157
for(auto &ch : to_escape)
159158
{
160-
const auto uch = narrow<int>(narrow_cast<unsigned char>(ch));
159+
const int uch{static_cast<unsigned char>(ch)};
161160
if(ch == '_')
162161
escaped << "__";
163162
else if(isalnum(uch))

0 commit comments

Comments
 (0)