Skip to content

Change type of Resize capacity from int to size_t#346

Merged
reyang merged 2 commits into
open-telemetry:masterfrom
ThomsonTan:FixResize
Sep 30, 2020
Merged

Change type of Resize capacity from int to size_t#346
reyang merged 2 commits into
open-telemetry:masterfrom
ThomsonTan:FixResize

Conversation

@ThomsonTan
Copy link
Copy Markdown
Contributor

Parameter new_capacity for RuntimeContext::Resize() should be in type size_t instead of int, to be consistent with size_.

This could cause issue because size_t could have larger range than int (this is the case on Windows 64-bit system which is in LLP64 data model), so convert size_t to int could cause data loss.

@ThomsonTan ThomsonTan requested a review from a team September 30, 2020 16:56
@codecov
Copy link
Copy Markdown

codecov Bot commented Sep 30, 2020

Codecov Report

Merging #346 into master will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #346   +/-   ##
=======================================
  Coverage   94.71%   94.71%           
=======================================
  Files         154      154           
  Lines        6847     6847           
=======================================
  Hits         6485     6485           
  Misses        362      362           
Impacted Files Coverage Δ
...pi/include/opentelemetry/context/runtime_context.h 97.36% <100.00%> (ø)

@reyang reyang merged commit 6d86905 into open-telemetry:master Sep 30, 2020
@ThomsonTan ThomsonTan deleted the FixResize branch November 9, 2020 09:08
GerHobbelt pushed a commit to GerHobbelt/opentelemetry-cpp that referenced this pull request Aug 31, 2025
…el_lib-2.x

Update dependency aspect_bazel_lib to v2.19.2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants