summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorleviathan <leviathan@lindenlab.com>2025-12-29 16:49:23 -0800
committerAndrey Kleshchev <117672381+akleshchev@users.noreply.github.com>2025-12-31 13:44:22 +0200
commitcba36bc1f49990a802892278ca98478edb31eda9 (patch)
tree6daad69e44382975dd9fe169618d2f278f69a5db
parent3ff35b8c2b530bc7d4e6fbdeb688506b27af2d66 (diff)
make LLCore::HttpStatus type enums constexpr
-rw-r--r--indra/llcorehttp/httpcommon.cpp4
-rw-r--r--indra/llcorehttp/httpcommon.h6
2 files changed, 3 insertions, 7 deletions
diff --git a/indra/llcorehttp/httpcommon.cpp b/indra/llcorehttp/httpcommon.cpp
index 315ff15ebb..dabc61975d 100644
--- a/indra/llcorehttp/httpcommon.cpp
+++ b/indra/llcorehttp/httpcommon.cpp
@@ -36,10 +36,6 @@
namespace LLCore
{
-HttpStatus::type_enum_t EXT_CURL_EASY;
-HttpStatus::type_enum_t EXT_CURL_MULTI;
-HttpStatus::type_enum_t LLCORE;
-
HttpStatus::operator U32() const
{
// Effectively, concatenate mType (high) with mStatus (low).
diff --git a/indra/llcorehttp/httpcommon.h b/indra/llcorehttp/httpcommon.h
index 1c003a0966..001fd08f93 100644
--- a/indra/llcorehttp/httpcommon.h
+++ b/indra/llcorehttp/httpcommon.h
@@ -340,9 +340,9 @@ struct HttpStatus
return *this;
}
- static const type_enum_t EXT_CURL_EASY = 0; ///< mStatus is an error from a curl_easy_*() call
- static const type_enum_t EXT_CURL_MULTI = 1; ///< mStatus is an error from a curl_multi_*() call
- static const type_enum_t LLCORE = 2; ///< mStatus is an HE_* error code
+ static constexpr type_enum_t EXT_CURL_EASY = 0; ///< mStatus is an error from a curl_easy_*() call
+ static constexpr type_enum_t EXT_CURL_MULTI = 1; ///< mStatus is an error from a curl_multi_*() call
+ static constexpr type_enum_t LLCORE = 2; ///< mStatus is an HE_* error code
///< 100-999 directly represent HTTP status codes
/// Test for successful status in the code regardless
/// of error source (internal, libcurl).