Conditionally compile API user services to save 4.3KB flash (follow-up to #9262) (#9451)

This commit is contained in:
J. Nick Koston authored and Jesse Hills committed 2025-07-13 11:05:13 +12:00
1 parent 3c864b2bca
commit 42947bcf56
23 files changed
+345 -52

No files matched your search

-8
View File
@@ -24,14 +24,6 @@ static const char *const TAG = "api";
// APIServer
APIServer *global_api_server = nullptr; // NOLINT(cppcoreguidelines-avoid-non-const-global-variables)
#ifndef USE_API_YAML_SERVICES
// Global empty vector to avoid guard variables (saves 8 bytes)
// This is initialized at program startup before any threads
static const std::vector<UserServiceDescriptor *> empty_user_services{};
const std::vector<UserServiceDescriptor *> &get_empty_user_services_instance() { return empty_user_services; }
#endif
APIServer::APIServer() {
global_api_server = this;
// Pre-allocate shared write buffer