From 35fd2d9dd29427bdf55119ac71b559c5f71ab45b Mon Sep 17 00:00:00 2001 From: Chao Qu Date: Sat, 4 Mar 2023 09:14:45 +0000 Subject: [PATCH] [SymForce] return size_t instead of int32_t from values::NumEntries() Topic: chaoqu_symforce_values_num_entries Reviewers: aaron, brad, nathan, hayk GitOrigin-RevId: 527716e9b97b3fe89d0db8362686e46304c58b6b --- symforce/opt/values.cc | 2 +- symforce/opt/values.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/symforce/opt/values.cc b/symforce/opt/values.cc index c715438f0..7538c7ec2 100644 --- a/symforce/opt/values.cc +++ b/symforce/opt/values.cc @@ -65,7 +65,7 @@ void Values::UpdateOrSet(const index_t& index, const Values& oth } template -int32_t Values::NumEntries() const { +size_t Values::NumEntries() const { return map_.size(); } diff --git a/symforce/opt/values.h b/symforce/opt/values.h index 1dd7cff62..cc9e5f878 100644 --- a/symforce/opt/values.h +++ b/symforce/opt/values.h @@ -93,7 +93,7 @@ class Values { /** * Number of keys. */ - int32_t NumEntries() const; + size_t NumEntries() const; /** * Has zero keys.