From 4c08d1cc86eb0265e4c59852036dba2493208dfb Mon Sep 17 00:00:00 2001 From: Mathew Sutcliffe Date: Thu, 26 May 2016 19:57:22 +0100 Subject: [PATCH] refs #659 Use constexpr with isPinned method of data cache traits. --- src/blackcore/data/authenticateduser.h | 2 +- src/blackcore/data/globalsetup.h | 2 +- src/blackcore/data/updateinfo.h | 2 +- src/blackcore/data/vatsimsetup.h | 2 +- src/blackmisc/datacache.h | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/blackcore/data/authenticateduser.h b/src/blackcore/data/authenticateduser.h index 704b98587..f2d187a4e 100644 --- a/src/blackcore/data/authenticateduser.h +++ b/src/blackcore/data/authenticateduser.h @@ -28,7 +28,7 @@ namespace BlackCore static const char *key() { return "dbuser"; } //! First load is synchronous - static bool isPinned() { return true; } + static constexpr bool isPinned() { return true; } //! Default value static const BlackMisc::Network::CAuthenticatedUser &defaultValue() diff --git a/src/blackcore/data/globalsetup.h b/src/blackcore/data/globalsetup.h index 3eb395b0f..fdae8f27f 100644 --- a/src/blackcore/data/globalsetup.h +++ b/src/blackcore/data/globalsetup.h @@ -196,7 +196,7 @@ namespace BlackCore static const char *key() { return "bootstrap"; } //! First load is synchronous - static bool isPinned() { return true; } + static constexpr bool isPinned() { return true; } //! Default value static const CGlobalSetup &defaultValue() diff --git a/src/blackcore/data/updateinfo.h b/src/blackcore/data/updateinfo.h index 60bda015a..de628cb20 100644 --- a/src/blackcore/data/updateinfo.h +++ b/src/blackcore/data/updateinfo.h @@ -125,7 +125,7 @@ namespace BlackCore static const char *key() { return "version"; } //! First load is synchronous - static bool isPinned() { return true; } + static constexpr bool isPinned() { return true; } //! Default value static const CUpdateInfo &defaultValue() diff --git a/src/blackcore/data/vatsimsetup.h b/src/blackcore/data/vatsimsetup.h index a11f9874f..c0bb65218 100644 --- a/src/blackcore/data/vatsimsetup.h +++ b/src/blackcore/data/vatsimsetup.h @@ -128,7 +128,7 @@ namespace BlackCore static const char *key() { return "vatsim"; } //! First load is synchronous - static bool isPinned() { return true; } + static constexpr bool isPinned() { return true; } //! Default value static const CVatsimSetup &defaultValue() diff --git a/src/blackmisc/datacache.h b/src/blackmisc/datacache.h index 4cbb1863a..a95afdd2a 100644 --- a/src/blackmisc/datacache.h +++ b/src/blackmisc/datacache.h @@ -332,7 +332,7 @@ namespace BlackMisc //! If true, then value will be synchronously loaded when CDataCache is constructed. //! Good for small, important values; bad for large ones. - static bool isPinned() { return false; } + static constexpr bool isPinned() { return false; } //! Deleted default constructor. CDataTrait() = delete;