Skip to content
Browse files

Constify read-only global data

Also silences a compiler warning about deprecated conversion from const
char* to char*.
  • Loading branch information...
1 parent 93cb096 commit eeaf1ef970a09cf8f77cff438fa7bcc004798295 @d0k d0k committed
Showing with 4 additions and 4 deletions.
  1. +4 −4 src/node_buffer.cc
View
8 src/node_buffer.cc
@@ -272,10 +272,10 @@ Handle<Value> Buffer::Utf8Slice(const Arguments &args) {
return scope.Close(string);
}
-static char* base64_table = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
- "abcdefghijklmnopqrstuvwxyz"
- "0123456789+/";
-static int unbase64_table[] =
+static const char *base64_table = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
+ "abcdefghijklmnopqrstuvwxyz"
+ "0123456789+/";
+static const int unbase64_table[] =
{-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1
,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1
,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,62,-1,-1,-1,63

0 comments on commit eeaf1ef

Please sign in to comment.
Something went wrong with that request. Please try again.