Skip to content

Commit

Permalink
add launchdarkly::unreachable to switch
Browse files Browse the repository at this point in the history
  • Loading branch information
cwaldren-ld committed Oct 24, 2023
1 parent 8345ebb commit 1e6f05d
Showing 1 changed file with 14 additions and 11 deletions.
25 changes: 14 additions & 11 deletions libs/server-sdk/src/data_store/persistent/persistent_data_store.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include "../memory_store.hpp"
#include "expiration_tracker.hpp"

#include <launchdarkly/detail/unreachable.hpp>
#include <launchdarkly/persistence/persistent_store_core.hpp>

#include <memory>
Expand All @@ -22,7 +23,7 @@ class SegmentKind : public persistence::IPersistentKind {
~SegmentKind() override = default;

private:
static const inline std::string namespace_ = "segments";
static inline std::string const namespace_ = "segments";
};

class FlagKind : public persistence::IPersistentKind {
Expand All @@ -33,12 +34,12 @@ class FlagKind : public persistence::IPersistentKind {
~FlagKind() override = default;

private:
static const inline std::string namespace_ = "features";
static inline std::string const namespace_ = "features";
};

struct Kinds {
static const FlagKind Flag;
static const SegmentKind Segment;
static FlagKind const Flag;
static SegmentKind const Segment;
};

class PersistentStore : public IDataStore,
Expand Down Expand Up @@ -105,6 +106,8 @@ class PersistentStore : public IDataStore,
[[fallthrough]];
case ExpirationTracker::TrackState::kFresh:
return get();
default:
launchdarkly::detail::unreachable();
}
}

Expand All @@ -122,7 +125,7 @@ class PersistentStore : public IDataStore,
~SegmentKind() override = default;

private:
static const inline std::string namespace_ = "segments";
static inline std::string const namespace_ = "segments";
};

class FlagKind : public persistence::IPersistentKind {
Expand All @@ -133,18 +136,18 @@ class PersistentStore : public IDataStore,
~FlagKind() override = default;

private:
static const inline std::string namespace_ = "features";
static inline std::string const namespace_ = "features";
};

struct Kinds {
static const FlagKind Flag;
static const SegmentKind Segment;
static FlagKind const Flag;
static SegmentKind const Segment;
};

struct Keys {
static const inline std::string kAllFlags = "allFlags";
static const inline std::string kAllSegments = "allSegments";
static const inline std::string kInitialized = "initialized";
static inline std::string const kAllFlags = "allFlags";
static inline std::string const kAllSegments = "allSegments";
static inline std::string const kInitialized = "initialized";
};
};

Expand Down

0 comments on commit 1e6f05d

Please sign in to comment.