Skip to content

Commit 055d331

Browse files
committed
make get a const method
1 parent 81ea997 commit 055d331

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

sdk/include/opentelemetry/sdk/metrics/data/circular_buffer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ class AdaptingCircularBufferCounter
137137
*
138138
* @return the number of recordings for the index, or 0 if the index is out of bounds.
139139
*/
140-
uint64_t Get(int32_t index);
140+
uint64_t Get(int32_t index) const;
141141

142142
private:
143143
size_t ToBufferIndex(int32_t index) const;

sdk/src/metrics/data/circular_buffer.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ bool AdaptingCircularBufferCounter::Increment(int32_t index, uint64_t delta)
168168
return true;
169169
}
170170

171-
uint64_t AdaptingCircularBufferCounter::Get(int32_t index)
171+
uint64_t AdaptingCircularBufferCounter::Get(int32_t index) const
172172
{
173173
if (index < start_index_ || index > end_index_)
174174
{

0 commit comments

Comments
 (0)