Renamed id to _id for ObjC compatibility.
authorTaybin Rutkin <taybin@taybin.com>
Tue, 15 Aug 2006 12:07:56 +0000 (12:07 +0000)
committerTaybin Rutkin <taybin@taybin.com>
Tue, 15 Aug 2006 12:07:56 +0000 (12:07 +0000)
git-svn-id: svn://localhost/ardour2/trunk@826 d708f5d6-7413-0410-9779-e7cbd77b26cf

libs/pbd/id.cc
libs/pbd/pbd/id.h

index 0de0d052c3d7a5e2d6e5c84697f8d553adba61df..ab7806873ebb54fed9852d27cb1a53505fcfc785 100644 (file)
@@ -25,7 +25,7 @@ ID::init ()
 ID::ID ()
 {
        Glib::Mutex::Lock lm (*counter_lock);
-       id = _counter++;
+       _id = _counter++;
 }
 
 ID::ID (string str)
@@ -36,14 +36,14 @@ ID::ID (string str)
 int
 ID::string_assign (string str)
 {
-       return sscanf (str.c_str(), "%" PRIu64, &id) != 0;
+       return sscanf (str.c_str(), "%" PRIu64, &_id) != 0;
 }
 
 void
 ID::print (char* buf) const
 {
        /* XXX sizeof buf is unknown. bad API design */
-       snprintf (buf, 16, "%" PRIu64, id);
+       snprintf (buf, 16, "%" PRIu64, _id);
 }
 
 string ID::to_s() const
@@ -61,10 +61,10 @@ ID::operator= (string str)
 }
 
 ostream&
-operator<< (ostream& ostr, const ID& id)
+operator<< (ostream& ostr, const ID& _id)
 {
        char buf[32];
-       id.print (buf);
+       _id.print (buf);
        ostr << buf;
        return ostr;
 }
index 1ce448d58bd1397b15d7379f4a8a426f9c6d1a98..c1103627342ba4d313052baa62cc03acb39de70e 100644 (file)
@@ -14,17 +14,17 @@ class ID {
        ID (std::string);
        
        bool operator== (const ID& other) const {
-               return id == other.id; 
+               return _id == other._id; 
        }
 
        bool operator!= (const ID& other) const {
-               return id != other.id;
+               return _id != other._id;
        }
 
        ID& operator= (std::string); 
 
        bool operator< (const ID& other) const {
-               return id < other.id;
+               return _id < other._id;
        }
 
        void print (char* buf) const;
@@ -35,7 +35,7 @@ class ID {
        static void init ();
 
   private:
-       uint64_t id;
+       uint64_t _id;
        int string_assign (std::string);
 
        static Glib::Mutex* counter_lock;