This is an automated email from the ASF dual-hosted git repository.

rmiddleton pushed a commit to branch location-info
in repository https://gitbox.apache.org/repos/asf/logging-log4cxx.git

commit 5fdf0d0bc3d4b81ab53f1ac53ca9d9ea95f3f79a
Author: Robert Middleton <[email protected]>
AuthorDate: Sun Jan 2 13:43:37 2022 -0500

    make sure we compile with C++11
---
 src/main/include/log4cxx/spi/location/locationinfo.h | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/src/main/include/log4cxx/spi/location/locationinfo.h 
b/src/main/include/log4cxx/spi/location/locationinfo.h
index 6587305..a7afa7f 100644
--- a/src/main/include/log4cxx/spi/location/locationinfo.h
+++ b/src/main/include/log4cxx/spi/location/locationinfo.h
@@ -129,6 +129,12 @@ class LOG4CXX_EXPORT LocationInfo
 }
 }
 
+#if defined(_WIN32)
+#define LOG4CXX_SHORT_FILENAME_SPLIT_CHAR '\\'
+#else
+#define LOG4CXX_SHORT_FILENAME_SPLIT_CHAR '/'
+#endif
+
 #if !defined(LOG4CXX_LOCATION) && !LOG4CXX_DISABLE_LOCATION_INFO
 #if defined(_MSC_VER)
        #if _MSC_VER >= 1300
@@ -149,11 +155,6 @@ class LOG4CXX_EXPORT LocationInfo
 
 #if __cpp_lib_string_view || (_MSVC_LANG >= 201703L)
 #include <string_view>
-#if defined(_WIN32)
-#define LOG4CXX_SHORT_FILENAME_SPLIT_CHAR '\\'
-#else
-#define LOG4CXX_SHORT_FILENAME_SPLIT_CHAR '/'
-#endif
 
 #define LOG4CXX_LOCATION_CREATE ::std::string_view file_name{__FILE__};\
        const size_t short_filename_offset = 
file_name.find_last_of(LOG4CXX_SHORT_FILENAME_SPLIT_CHAR) + 1;\

Reply via email to