diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/jobs/syncjob.cpp | 2 | ||||
-rw-r--r-- | lib/util.h | 8 |
2 files changed, 9 insertions, 1 deletions
diff --git a/lib/jobs/syncjob.cpp b/lib/jobs/syncjob.cpp index f9f5666e..cbdc37b4 100644 --- a/lib/jobs/syncjob.cpp +++ b/lib/jobs/syncjob.cpp @@ -129,7 +129,7 @@ SyncRoomData::SyncRoomData(const QString& roomId_, JoinState joinState_, case JoinState::Join: ephemeral = load<Events>(room_, "ephemeral"); accountData = load<Events>(room_, "account_data"); - // [[fallthrough]] + FALLTHROUGH; case JoinState::Leave: { timeline = load<RoomEvents>(room_, "timeline"); @@ -27,6 +27,14 @@ #include <functional> #include <memory> +#if __cplusplus >= 201703L +#define FALLTHROUGH [[fallthrough]] +#elif __has_cpp_attribute(clang::fallthrough) +#define FALLTHROUGH [[clang::fallthrough]] +#else +#define FALLTHROUGH // -fallthrough +#endif + namespace QMatrixClient { // The below enables pretty-printing of enums in logs |