We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6254580 commit 8948493Copy full SHA for 8948493
trantor/utils/Logger.h
@@ -56,7 +56,11 @@ class TRANTOR_EXPORT Logger : public NonCopyable
56
inline SourceFile(const char (&arr)[N]) : data_(arr), size_(N - 1)
57
{
58
// std::cout<<data_<<std::endl;
59
+#ifndef _MSC_VER
60
const char *slash = strrchr(data_, '/'); // builtin function
61
+#else
62
+ const char *slash = strrchr(data_, '\\');
63
+#endif
64
if (slash)
65
66
data_ = slash + 1;
@@ -66,7 +70,11 @@ class TRANTOR_EXPORT Logger : public NonCopyable
70
67
71
explicit SourceFile(const char *filename) : data_(filename)
68
72
73
69
74
const char *slash = strrchr(filename, '/');
75
76
+ const char *slash = strrchr(filename, '\\');
77
78
79
80
0 commit comments