Skip to content

Commit 1183580

Browse files
committed
remove the c code path
1 parent 888bbb9 commit 1183580

File tree

1 file changed

+11
-29
lines changed

1 file changed

+11
-29
lines changed

tinyxml2.cpp

Lines changed: 11 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -36,38 +36,20 @@ distribution.
3636
#ifndef __has_attribute
3737
# define __has_attribute(x) 0
3838
#endif
39-
#ifdef __cplusplus
40-
# ifndef __has_cpp_attribute
41-
# define __has_cpp_attribute(x) 0
42-
# endif
43-
#else
44-
# ifndef __has_c_attribute
45-
# define __has_c_attribute(x) 0
46-
# endif
39+
#ifndef __has_cpp_attribute
40+
# define __has_cpp_attribute(x) 0
4741
#endif
4842

49-
#ifdef __cplusplus
50-
# if defined(_MSC_VER)
51-
# define TIXML_FALLTHROUGH (void(0))
52-
# elif (__cplusplus >= 201703L && __has_cpp_attribute(fallthrough))
53-
# define TIXML_FALLTHROUGH [[fallthrough]]
54-
# elif __has_cpp_attribute(clang::fallthrough)
55-
# define TIXML_FALLTHROUGH [[clang::fallthrough]]
56-
# elif __has_attribute(fallthrough)
57-
# define TIXML_FALLTHROUGH __attribute__((fallthrough))
58-
# else
59-
# define TIXML_FALLTHROUGH (void(0))
60-
# endif
43+
#if defined(_MSC_VER)
44+
# define TIXML_FALLTHROUGH (void(0))
45+
#elif (__cplusplus >= 201703L && __has_cpp_attribute(fallthrough))
46+
# define TIXML_FALLTHROUGH [[fallthrough]]
47+
#elif __has_cpp_attribute(clang::fallthrough)
48+
# define TIXML_FALLTHROUGH [[clang::fallthrough]]
49+
#elif __has_attribute(fallthrough)
50+
# define TIXML_FALLTHROUGH __attribute__((fallthrough))
6151
#else
62-
# if defined(_MSC_VER)
63-
# define TIXML_FALLTHROUGH (void(0))
64-
# elif __has_c_attribute(fallthrough)
65-
# define TIXML_FALLTHROUGH [[fallthrough]]
66-
# elif __has_attribute(fallthrough)
67-
# define TIXML_FALLTHROUGH __attribute__((fallthrough))
68-
# else
69-
# define TIXML_FALLTHROUGH (void(0))
70-
# endif
52+
# define TIXML_FALLTHROUGH (void(0))
7153
#endif
7254

7355

0 commit comments

Comments
 (0)