Chromium Code Reviews

Unified Diff: net/base/net_errors.cc

Issue 5103001: Add shared macros for stringizing and converting ANSI string constants... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
« base/preprocessor_util.h ('K') | « media/base/media_posix.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/net_errors.cc
===================================================================
--- net/base/net_errors.cc (revision 66180)
+++ net/base/net_errors.cc (working copy)
@@ -5,9 +5,8 @@
#include "net/base/net_errors.h"
#include "base/basictypes.h"
+#include "base/preprocessor_util.h"
-#define STRINGIZE(x) #x
-
namespace net {
const char kErrorDomain[] = "net";
@@ -19,7 +18,7 @@
switch (error) {
#define NET_ERROR(label, value) \
case ERR_ ## label: \
- return "net::" STRINGIZE(ERR_ ## label);
+ return "net::" STRINGIZE_NO_EXPANSION(ERR_ ## label);
#include "net/base/net_error_list.h"
#undef NET_ERROR
default:
« base/preprocessor_util.h ('K') | « media/base/media_posix.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine