Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 22c150d

Browse files
committed
Fix: Use unorderd_map to hold offsets to perform merge properly
1 parent 6b8633b commit 22c150d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/include/servoarray/user_config.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,13 @@ class MapConfig {
5454
};
5555

5656
class OffsetConfig {
57-
std::vector<double> offsets_;
57+
std::unordered_map<std::size_t, double> offsets_;
5858

5959
friend class UserConfig;
6060

6161
public:
62-
const std::vector<double>& offsets() const&;
63-
std::vector<double> offsets() &&;
62+
const std::unordered_map<std::size_t, double>& offsets() const&;
63+
std::unordered_map<std::size_t, double> offsets() &&;
6464

6565
OffsetConfig& merge(const OffsetConfig&);
6666
};

0 commit comments

Comments
 (0)