Skip to content

Commit

Permalink
add missing inline specifiers (#660)
Browse files Browse the repository at this point in the history
  • Loading branch information
seemk authored Apr 6, 2021
1 parent fe34585 commit 1a5737a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace propagation
namespace detail
{

trace::SpanContext GetCurrentSpan(const context::Context &context)
inline trace::SpanContext GetCurrentSpan(const context::Context &context)
{
context::ContextValue span = context.GetValue(trace::kSpanKey);
if (nostd::holds_alternative<nostd::shared_ptr<trace::Span>>(span))
Expand Down
4 changes: 2 additions & 2 deletions api/include/opentelemetry/trace/propagation/detail/hex.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ inline int8_t HexToInt(char c)
return kHexDigits[uint8_t(c)];
}

bool IsValidHex(nostd::string_view s)
inline bool IsValidHex(nostd::string_view s)
{
return std::all_of(s.begin(), s.end(), [](char c) { return HexToInt(c) != -1; });
}
Expand All @@ -41,7 +41,7 @@ bool IsValidHex(nostd::string_view s)
* Converts a hexadecimal to binary format if the hex string will fit the buffer.
* Smaller hex strings are left padded with zeroes.
*/
bool HexToBinary(nostd::string_view hex, uint8_t *buffer, size_t buffer_size)
inline bool HexToBinary(nostd::string_view hex, uint8_t *buffer, size_t buffer_size)
{
std::memset(buffer, 0, buffer_size);

Expand Down
5 changes: 4 additions & 1 deletion api/include/opentelemetry/trace/propagation/detail/string.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ namespace detail
* Splits a string by separator, up to given buffer count words.
* Returns the amount of words the input was split into.
*/
size_t SplitString(nostd::string_view s, char separator, nostd::string_view *results, size_t count)
inline size_t SplitString(nostd::string_view s,
char separator,
nostd::string_view *results,
size_t count)
{
if (count == 0)
{
Expand Down

0 comments on commit 1a5737a

Please sign in to comment.