Skip to content

Commit 2d9351c

Browse files
fix: add missing <cstdint> in various headers (#360)
On our existing test systems (ubuntu, mac, windows), <cstdint> is included via other system headers such that compilation succeeds. On Arch, this isn't the case. --------- Co-authored-by: Casey Waldren <[email protected]>
1 parent 8de6145 commit 2d9351c

File tree

4 files changed

+11
-7
lines changed

4 files changed

+11
-7
lines changed

libs/server-sdk/include/launchdarkly/server_side/all_flags_state.hpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
#include <launchdarkly/data/evaluation_reason.hpp>
44
#include <launchdarkly/value.hpp>
55

6+
#include <cstdint>
67
#include <optional>
78
#include <string>
89
#include <unordered_map>
@@ -153,8 +154,8 @@ class AllFlagsState {
153154

154155
private:
155156
bool const valid_;
156-
const std::unordered_map<std::string, class State> flags_state_;
157-
const std::unordered_map<std::string, Value> evaluations_;
157+
std::unordered_map<std::string, class State> const flags_state_;
158+
std::unordered_map<std::string, Value> const evaluations_;
158159
};
159160

160161
void operator|=(AllFlagsState::Options& lhs, AllFlagsState::Options rhs);

libs/server-sdk/src/evaluation/bucketing.hpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
#include <tl/expected.hpp>
1010

11+
#include <cstdint>
1112
#include <limits>
1213
#include <optional>
1314
#include <ostream>
@@ -108,16 +109,16 @@ class BucketResult {
108109
* variation index for the context. For a plain variation, this is simply the
109110
* variation index. For a rollout, this utilizes the Bucket function.
110111
*
111-
* @param vr Variation or rollout.
112+
* @param variation_or_rollout Variation or rollout.
112113
* @param flag_key Key of flag.
113114
* @param context Context to bucket.
114115
* @param salt Salt to use when bucketing.
115116
* @return A BucketResult on success, or an error if bucketing failed.
116117
*/
117118
tl::expected<BucketResult, Error> Variation(
118-
data_model::Flag::VariationOrRollout const& vr,
119+
data_model::Flag::VariationOrRollout const& variation_or_rollout,
119120
std::string const& flag_key,
120-
launchdarkly::Context const& context,
121+
Context const& context,
121122
std::optional<std::string> const& salt);
122123

123124
} // namespace launchdarkly::server_side::evaluation

libs/server-sdk/src/evaluation/detail/semver_operations.hpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#pragma once
22

3+
#include <cstdint>
34
#include <optional>
45
#include <string>
56
#include <variant>
@@ -81,8 +82,8 @@ bool operator>(SemVer const& lhs, SemVer const& rhs);
8182
* containing a build string, it will not be present as this information
8283
* is discarded when parsing.
8384
*/
84-
std::ostream& operator<<(std::ostream& out, SemVer const& sv);
85+
std::ostream& operator<<(std::ostream& out, SemVer const& semver);
8586

86-
std::ostream& operator<<(std::ostream& out, SemVer::Token const& sv);
87+
std::ostream& operator<<(std::ostream& out, SemVer::Token const& semver_token);
8788

8889
} // namespace launchdarkly::server_side::evaluation::detail

libs/server-sdk/src/evaluation/evaluation_error.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#pragma once
22

3+
#include <cstdint>
34
#include <optional>
45
#include <ostream>
56

0 commit comments

Comments
 (0)