do not make m_enable protected
authorMathieu Lacage <mathieu.lacage@sophia.inria.fr>
Wed, 02 Jul 2008 13:21:43 -0700
changeset 3371 e472358ea634
parent 3370 2f8c7ecfe3ba
child 3372 184673f59f53
do not make m_enable protected
src/common/error-model.cc
src/common/error-model.h
--- a/src/common/error-model.cc	Wed Jul 02 13:21:01 2008 -0700
+++ b/src/common/error-model.cc	Wed Jul 02 13:21:43 2008 -0700
@@ -178,7 +178,7 @@
 RateErrorModel::DoCorrupt (Ptr<Packet> p) 
 { 
   NS_LOG_FUNCTION_NOARGS ();
-  if (!m_enable)
+  if (!IsEnabled ())
     {
       return false;  
     }
@@ -275,7 +275,7 @@
 ListErrorModel::DoCorrupt (Ptr<Packet> p) 
 { 
   NS_LOG_FUNCTION_NOARGS ();
-  if (!m_enable)
+  if (!IsEnabled ())
     {
       return false;  
     }
--- a/src/common/error-model.h	Wed Jul 02 13:21:01 2008 -0700
+++ b/src/common/error-model.h	Wed Jul 02 13:21:43 2008 -0700
@@ -104,9 +104,6 @@
    */
   bool IsEnabled (void) const;
 
-protected:
-  bool m_enable;
-
 private:
   /*
    * These methods must be implemented by subclasses
@@ -114,6 +111,7 @@
   virtual bool DoCorrupt (Ptr<Packet>) = 0;
   virtual void DoReset (void) = 0;
 
+  bool m_enable;
 };
 
 enum ErrorUnit