Browse Source

[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).
Michal 'vorner' Vaner 12 years ago
parent
commit
d007842f66
2 changed files with 0 additions and 6 deletions
  1. 0 4
      src/lib/datasrc/client_list.h
  2. 0 2
      src/lib/datasrc/tests/client_list_unittest.cc

+ 0 - 4
src/lib/datasrc/client_list.h

@@ -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_);

+ 0 - 2
src/lib/datasrc/tests/client_list_unittest.cc

@@ -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());
 }
 
 }