Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ OTABSL_NAMESPACE_BEGIN
template <class... Types>
class variant;

OTABSL_INTERNAL_INLINE_CONSTEXPR(size_t, variant_npos, -1);
OTABSL_INTERNAL_INLINE_CONSTEXPR(size_t, variant_npos, static_cast<std::size_t>(-1));

template <class T>
struct variant_size;
Expand Down
2 changes: 1 addition & 1 deletion api/include/opentelemetry/nostd/string_view.h
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ class string_view
auto found = Traits::find(data() + pos, length() - pos, ch);
if (found)
{
res = found - data();
res = static_cast<size_type>(found - data());
}
}
return res;
Expand Down
4 changes: 2 additions & 2 deletions api/include/opentelemetry/trace/span_id.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class SpanId final
{
public:
// The size in bytes of the SpanId.
static constexpr int kSize = 8;
static constexpr size_t kSize = 8;

// An invalid SpanId (all zeros).
SpanId() noexcept : rep_{0} {}
Expand All @@ -29,7 +29,7 @@ class SpanId final
void ToLowerBase16(nostd::span<char, 2 * kSize> buffer) const noexcept
{
constexpr char kHex[] = "0123456789abcdef";
for (int i = 0; i < kSize; ++i)
for (size_t i = 0; i < kSize; ++i)
{
buffer[i * 2 + 0] = kHex[(rep_[i] >> 4) & 0xF];
buffer[i * 2 + 1] = kHex[(rep_[i] >> 0) & 0xF];
Expand Down
4 changes: 2 additions & 2 deletions api/include/opentelemetry/trace/trace_id.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class TraceId final
{
public:
// The size in bytes of the TraceId.
static constexpr int kSize = 16;
static constexpr size_t kSize = 16;

// An invalid TraceId (all zeros).
TraceId() noexcept : rep_{0} {}
Expand All @@ -35,7 +35,7 @@ class TraceId final
void ToLowerBase16(nostd::span<char, 2 * kSize> buffer) const noexcept
{
constexpr char kHex[] = "0123456789abcdef";
for (int i = 0; i < kSize; ++i)
for (size_t i = 0; i < kSize; ++i)
{
buffer[i * 2 + 0] = kHex[(rep_[i] >> 4) & 0xF];
buffer[i * 2 + 1] = kHex[(rep_[i] >> 0) & 0xF];
Expand Down