diff options
| author | Ed Tanous <ed.tanous@intel.com> | 2019-10-24 10:01:46 -0700 |
|---|---|---|
| committer | James Feist <james.feist@linux.intel.com> | 2019-11-07 18:41:29 +0000 |
| commit | 0c838cf6c0765ee793d3942faf35562806df946b (patch) | |
| tree | 7a662c56d2d0c5ec95f1531c4b6a5116612bb950 /http | |
| parent | 0d4197e0b9262b21e20d79456ef148407cb52791 (diff) | |
| download | bmcweb-0c838cf6c0765ee793d3942faf35562806df946b.tar.gz bmcweb-0c838cf6c0765ee793d3942faf35562806df946b.zip | |
Move some variables to constexpr
clang-tidy flags these variables as having lifetime issues given that
they point to compile time parameters, resolve the error:
Tested: Code compiles, clang-tidy no longer returns an error on that
line.
Signed-off-by: Ed Tanous <ed.tanous@intel.com>
Change-Id: Iaa0da0c346786a79a6e66877082c3716bcffdf69
Diffstat (limited to 'http')
| -rw-r--r-- | http/http_connection.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/http/http_connection.h b/http/http_connection.h index ef42f84..7cab789 100644 --- a/http/http_connection.h +++ b/http/http_connection.h @@ -113,7 +113,7 @@ template <typename T> struct IsBeforeHandleArity3Impl template <typename C> static std::false_type f(...); public: - static const bool value = decltype(f<T>(nullptr))::value; + static constexpr bool value = decltype(f<T>(nullptr))::value; }; template <typename T> struct IsAfterHandleArity3Impl @@ -129,7 +129,7 @@ template <typename T> struct IsAfterHandleArity3Impl template <typename C> static std::false_type f(...); public: - static const bool value = decltype(f<T>(nullptr))::value; + static constexpr bool value = decltype(f<T>(nullptr))::value; }; template <typename MW, typename Context, typename ParentContext> |

