File tree Expand file tree Collapse file tree 4 files changed +6
-6
lines changed
api/include/opentelemetry
internal/absl/types/internal Expand file tree Collapse file tree 4 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ OTABSL_NAMESPACE_BEGIN
4545template <class ... Types>
4646class variant ;
4747
48- OTABSL_INTERNAL_INLINE_CONSTEXPR (size_t , variant_npos, - 1 );
48+ OTABSL_INTERNAL_INLINE_CONSTEXPR (size_t , variant_npos, static_cast <std:: size_t >(- 1 ) );
4949
5050template <class T >
5151struct variant_size ;
Original file line number Diff line number Diff line change @@ -124,7 +124,7 @@ class string_view
124124 auto found = Traits::find (data () + pos, length () - pos, ch);
125125 if (found)
126126 {
127- res = found - data ();
127+ res = static_cast <size_type>( found - data () );
128128 }
129129 }
130130 return res;
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ class SpanId final
1717{
1818public:
1919 // The size in bytes of the SpanId.
20- static constexpr int kSize = 8 ;
20+ static constexpr size_t kSize = 8 ;
2121
2222 // An invalid SpanId (all zeros).
2323 SpanId () noexcept : rep_{0 } {}
@@ -29,7 +29,7 @@ class SpanId final
2929 void ToLowerBase16 (nostd::span<char , 2 * kSize > buffer) const noexcept
3030 {
3131 constexpr char kHex [] = " 0123456789abcdef" ;
32- for (int i = 0 ; i < kSize ; ++i)
32+ for (size_t i = 0 ; i < kSize ; ++i)
3333 {
3434 buffer[i * 2 + 0 ] = kHex [(rep_[i] >> 4 ) & 0xF ];
3535 buffer[i * 2 + 1 ] = kHex [(rep_[i] >> 0 ) & 0xF ];
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ class TraceId final
2020{
2121public:
2222 // The size in bytes of the TraceId.
23- static constexpr int kSize = 16 ;
23+ static constexpr size_t kSize = 16 ;
2424
2525 // An invalid TraceId (all zeros).
2626 TraceId () noexcept : rep_{0 } {}
@@ -35,7 +35,7 @@ class TraceId final
3535 void ToLowerBase16 (nostd::span<char , 2 * kSize > buffer) const noexcept
3636 {
3737 constexpr char kHex [] = " 0123456789abcdef" ;
38- for (int i = 0 ; i < kSize ; ++i)
38+ for (size_t i = 0 ; i < kSize ; ++i)
3939 {
4040 buffer[i * 2 + 0 ] = kHex [(rep_[i] >> 4 ) & 0xF ];
4141 buffer[i * 2 + 1 ] = kHex [(rep_[i] >> 0 ) & 0xF ];
You can’t perform that action at this time.
0 commit comments