Skip to content

Commit eeaf1ef

Browse files
committed
Constify read-only global data
Also silences a compiler warning about deprecated conversion from const char* to char*.
1 parent 93cb096 commit eeaf1ef

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

‎src/node_buffer.cc‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -272,10 +272,10 @@ Handle<Value> Buffer::Utf8Slice(const Arguments &args) {
272272
return scope.Close(string);
273273
}
274274

275-
static char* base64_table = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
276-
"abcdefghijklmnopqrstuvwxyz"
277-
"0123456789+/";
278-
static int unbase64_table[] =
275+
static const char *base64_table = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
276+
"abcdefghijklmnopqrstuvwxyz"
277+
"0123456789+/";
278+
static const int unbase64_table[] =
279279
{-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1
280280
,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1
281281
,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,62,-1,-1,-1,63

0 commit comments

Comments
 (0)