gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-commit] gnash ChangeLog server/as_prop_flags.h


From: Sandro Santilli
Subject: [Gnash-commit] gnash ChangeLog server/as_prop_flags.h
Date: Wed, 25 Oct 2006 14:39:01 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Sandro Santilli <strk>  06/10/25 14:39:01

Modified files:
        .              : ChangeLog 
        server         : as_prop_flags.h 

Log message:
        * server/as_prop_flags.h (set_flags): changed interface to return bool, 
documented and simplified implementation.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.1390&r2=1.1391
http://cvs.savannah.gnu.org/viewcvs/gnash/server/as_prop_flags.h?cvsroot=gnash&r1=1.2&r2=1.3

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.1390
retrieving revision 1.1391
diff -u -b -r1.1390 -r1.1391
--- ChangeLog   25 Oct 2006 10:08:06 -0000      1.1390
+++ ChangeLog   25 Oct 2006 14:39:00 -0000      1.1391
@@ -1,3 +1,8 @@
+2006-10-25 Sandro Santilli <address@hidden>
+
+       * server/as_prop_flags.h (set_flags): changed interface
+         to return bool, documented and simplified implementation.
+
 2006-10-25 Markus Gothe <address@hidden>
 
        * macros/jpeg.m4: Fixed double -I-bug.

Index: server/as_prop_flags.h
===================================================================
RCS file: /sources/gnash/gnash/server/as_prop_flags.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- server/as_prop_flags.h      26 Aug 2006 02:08:31 -0000      1.2
+++ server/as_prop_flags.h      25 Oct 2006 14:39:01 -0000      1.3
@@ -100,15 +100,23 @@
        /// If unlocked is false, you cannot un-protect from over-write,
        /// you cannot un-protect from deletion and you cannot
        /// un-hide from the for..in loop construct
-       int set_flags(const int setTrue, const int set_false = 0)
+       ///
+       /// @param setTrue
+       ///     the set of flags to set
+       ///
+       /// @param setFalse
+       ///     the set of flags to clear
+       ///
+       /// @return true on success, false on failure (is protected)
+       ///
+       bool set_flags(const int setTrue, const int setFalse = 0)
        {
-               if (!this->get_is_protected())
-               {
-                       this->m_flags = this->m_flags & (~set_false);
-                       this->m_flags |= setTrue;
-               }
+               if (get_is_protected()) return false;
+
+               m_flags &= ~setFalse;
+               m_flags |= setTrue;
 
-               return get_flags();
+               return true;
        }
 };
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]