Skip to content

Commit

Permalink
url: const-ify first argument of ToUnicode function
Browse files Browse the repository at this point in the history
Fixes a compiler error on Windows.

Refs: nodejs#15615 (comment)
  • Loading branch information
lpinca committed Oct 2, 2017
1 parent 9e9c83e commit 44a55cf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/node_url.cc
Original file line number Diff line number Diff line change
Expand Up @@ -573,7 +573,7 @@ static inline int NormalizePort(std::string scheme, int p) {
}

#if defined(NODE_HAVE_I18N_SUPPORT)
static inline bool ToUnicode(std::string* input, std::string* output) {
static inline bool ToUnicode(const std::string* input, std::string* output) {
MaybeStackBuffer<char> buf;
if (i18n::ToUnicode(&buf, input->c_str(), input->length()) < 0)
return false;
Expand All @@ -590,7 +590,7 @@ static inline bool ToASCII(std::string* input, std::string* output) {
}
#else
// Intentional non-ops if ICU is not present.
static inline bool ToUnicode(std::string* input, std::string* output) {
static inline bool ToUnicode(const std::string* input, std::string* output) {
*output = *input;
return true;
}
Expand Down

0 comments on commit 44a55cf

Please sign in to comment.