Make the segmentState property of the DataSourceStatus immutable, making the whole class read-only (except for assignment, which is needed for putting it into a vector).
@@ -76,10 +76,6 @@ public:
name_(name),
state_(state)
{}
- /// \brief Change the current segment state
- void setSegmentState(MemorySegmentState state) {
- state_ = state;
- }
/// \brief Get the current segment state
MemorySegmentState getSegmentState() const {
return (state_);
@@ -1166,8 +1166,6 @@ TEST(DataSourceStatus, status) {
DataSourceStatus status("Test", MSS_UNUSED);
EXPECT_EQ("Test", status.getName());
EXPECT_EQ(MSS_UNUSED, status.getSegmentState());
- status.setSegmentState(MSS_LOCAL);
- EXPECT_EQ(MSS_LOCAL, status.getSegmentState());
}