Update of /cvsroot/playerstage/code/player/libplayercore
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4217/libplayercore

Modified Files:
        property.cpp 
Log Message:
fixed unitialised readonly in properties
changd readonly to only be read only from messages


Index: property.cpp
===================================================================
RCS file: /cvsroot/playerstage/code/player/libplayercore/property.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** property.cpp        11 Aug 2007 00:21:28 -0000      1.4
--- property.cpp        28 Feb 2008 05:21:27 -0000      1.5
***************
*** 48,56 ****
  
  Property::Property (void)
!       : key (NULL)
  {
  }
  
  Property::Property (const char *newKey, bool readOnly)
  {
        if ((key = strdup (newKey)) == NULL)
--- 48,57 ----
  
  Property::Property (void)
!       : key (NULL), readonly(false)
  {
  }
  
  Property::Property (const char *newKey, bool readOnly)
+       : readonly(readOnly)
  {
        if ((key = strdup (newKey)) == NULL)
***************
*** 97,106 ****
  void IntProperty::SetValue (int newValue)
  {
!       if (readonly)
!       {
!               PLAYER_WARN2 ("Property %s is read only, cannot change value 50 
%d", key, newValue);
!               return;
!       }
! 
        value = newValue;
  }
--- 98,107 ----
  void IntProperty::SetValue (int newValue)
  {
! //    if (readonly)
! //    {
! //            PLAYER_WARN2 ("Property %s is read only, cannot change value 50 
%d", key, newValue);
! //            return;
! //    }
! //
        value = newValue;
  }
***************
*** 115,119 ****
        if (readonly)
        {
!               PLAYER_WARN2 ("Property %s is read only, cannot change value 50 
%d", key, reinterpret_cast<const player_intprop_req_t*> (data)->value);
                return;
        }
--- 116,120 ----
        if (readonly)
        {
!               PLAYER_WARN2 ("Property %s is read only, cannot change value 
%d", key, reinterpret_cast<const player_intprop_req_t*> (data)->value);
                return;
        }
***************
*** 132,140 ****
  const IntProperty& IntProperty::operator= (const IntProperty &rhs)
  {
!       if (readonly)
!       {
!               PLAYER_WARN2 ("Property %s is read only, cannot change value 50 
%d", key, rhs.GetValue ());
!               return *this;
!       }
  
        value = rhs.GetValue ();
--- 133,141 ----
  const IntProperty& IntProperty::operator= (const IntProperty &rhs)
  {
! //    if (readonly)
! //    {
! //            PLAYER_WARN2 ("Property %s is read only, cannot change value 50 
%d", key, rhs.GetValue ());
! //            return *this;
! //    }
  
        value = rhs.GetValue ();
***************
*** 144,153 ****
  int IntProperty::operator= (int rhs)
  {
!       if (readonly)
!       {
!               PLAYER_WARN2 ("Property %s is read only, cannot change value 50 
%d", key, rhs);
!               return value;
!       }
! 
        value = rhs;
        return value;
--- 145,154 ----
  int IntProperty::operator= (int rhs)
  {
! //    if (readonly)
! //    {
! //            PLAYER_WARN2 ("Property %s is read only, cannot change value 50 
%d", key, rhs);
! //            return value;
! //    }
! //
        value = rhs;
        return value;
***************
*** 164,173 ****
  void DoubleProperty::SetValue (double newValue)
  {
!       if (readonly)
!       {
!               PLAYER_WARN2 ("Property %s is read only, cannot change value 50 
%f", key, newValue);
!               return;
!       }
! 
        value = newValue;
  }
--- 165,174 ----
  void DoubleProperty::SetValue (double newValue)
  {
! //    if (readonly)
! //    {
! //            PLAYER_WARN2 ("Property %s is read only, cannot change value 50 
%f", key, newValue);
! //            return;
! //    }
! //
        value = newValue;
  }
***************
*** 182,186 ****
        if (readonly)
        {
!               PLAYER_WARN2 ("Property %s is read only, cannot change value 50 
%f", key, reinterpret_cast<const player_dblprop_req_t*> (data)->value);
                return;
        }
--- 183,187 ----
        if (readonly)
        {
!               PLAYER_WARN2 ("Property %s is read only, cannot change value 
%f", key, reinterpret_cast<const player_dblprop_req_t*> (data)->value);
                return;
        }
***************
*** 199,207 ****
  const DoubleProperty& DoubleProperty::operator= (const DoubleProperty &rhs)
  {
!       if (readonly)
!       {
!               PLAYER_WARN2 ("Property %s is read only, cannot change value 50 
%f", key, rhs.GetValue ());
!               return *this;
!       }
  
        value = rhs.GetValue ();
--- 200,208 ----
  const DoubleProperty& DoubleProperty::operator= (const DoubleProperty &rhs)
  {
! //    if (readonly)
! //    {
! //            PLAYER_WARN2 ("Property %s is read only, cannot change value 50 
%f", key, rhs.GetValue ());
! //            return *this;
! //    }
  
        value = rhs.GetValue ();
***************
*** 211,219 ****
  double DoubleProperty::operator= (double rhs)
  {
!       if (readonly)
!       {
!               PLAYER_WARN2 ("Property %s is read only, cannot change value 50 
%f", key, rhs);
!               return value;
!       }
  
        value = rhs;
--- 212,220 ----
  double DoubleProperty::operator= (double rhs)
  {
! //    if (readonly)
! //    {
! //            PLAYER_WARN2 ("Property %s is read only, cannot change value 50 
%f", key, rhs);
! //            return value;
! //    }
  
        value = rhs;
***************
*** 247,255 ****
  void StringProperty::SetValue (const char *newValue)
  {
!       if (readonly)
!       {
!               PLAYER_WARN2 ("Property %s is read only, cannot change value 50 
%s", key, newValue);
!               return;
!       }
  
        if (value != NULL)
--- 248,256 ----
  void StringProperty::SetValue (const char *newValue)
  {
! //    if (readonly)
! //    {
! //            PLAYER_WARN2 ("Property %s is read only, cannot change value 50 
%s", key, newValue);
! //            return;
! //    }
  
        if (value != NULL)
***************
*** 287,291 ****
        if (readonly)
        {
!               PLAYER_WARN2 ("Property %s is read only, cannot change value 50 
%s", key, reinterpret_cast<const player_strprop_req_t*> (data)->value);
                return;
        }
--- 288,292 ----
        if (readonly)
        {
!               PLAYER_WARN2 ("Property %s is read only, cannot change value 
%s", key, reinterpret_cast<const player_strprop_req_t*> (data)->value);
                return;
        }
***************
*** 322,330 ****
  const StringProperty& StringProperty::operator= (const StringProperty &rhs)
  {
!       if (readonly)
!       {
!               PLAYER_WARN2 ("Property %s is read only, cannot change value 50 
%s", key, rhs.GetValue ());
!               return *this;
!       }
  
        if (value != NULL)
--- 323,331 ----
  const StringProperty& StringProperty::operator= (const StringProperty &rhs)
  {
! //    if (readonly)
! //    {
! //            PLAYER_WARN2 ("Property %s is read only, cannot change value 50 
%s", key, rhs.GetValue ());
! //            return *this;
! //    }
  
        if (value != NULL)


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Playerstage-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit

Reply via email to