Commit d007842f authored by Michal 'vorner' Vaner's avatar Michal 'vorner' Vaner
Browse files

[2835] Make the DataSourceStatus read-only

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).
parent d25f0e1e
......@@ -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());
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment