Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7163 in orxonox.OLD for trunk/src/lib/lang


Ignore:
Timestamp:
Feb 18, 2006, 5:21:03 PM (19 years ago)
Author:
bensch
Message:

trunk:fixed a runtime-bug

Location:
trunk/src/lib/lang
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/lang/class_list.cc

    r7162 r7163  
    178178 * !!PRIVATE!!
    179179 * @param classID the ClassID to search for
    180  * @returns the ClassList with classID as specifyer, or NULL if not
     180 * @returns the ClassList with classID as specifier, or NULL if not
    181181 */
    182182ClassList* ClassList::getClassList(ClassID classID)
    183183{
    184   std::vector<ClassList>::iterator classIT = find (ClassList::classList->begin(), ClassList::classList->end(), classID);
     184  std::vector<ClassList>::iterator classIT = std::find (ClassList::classList->begin(), ClassList::classList->end(), classID);
    185185  return (likely(classIT != classList->end()))? &(*classIT) : NULL;
    186186}
     
    190190 * !!PRIVATE!!
    191191 * @param className the ClassName to search for
    192  * @returns the ClassList with className as specifyer, or NULL if not
     192 * @returns the ClassList with className as specifier, or NULL if not
    193193 */
    194194ClassList* ClassList::getClassList(const char* className)
     
    196196  if (className == NULL)
    197197    return NULL;
    198   std::vector<ClassList>::iterator classIT = find (classList->begin(), classList->end(), className);
     198  std::vector<ClassList>::iterator classIT = find (ClassList::classList->begin(), ClassList::classList->end(), className);
    199199  return (likely(classIT != classList->end()))? &(*classIT) : NULL;
    200200}
  • trunk/src/lib/lang/class_list.h

    r7162 r7163  
    5959    inline bool                           operator==(ClassID classID) { return (this->classID == classID); };
    6060    bool                                  operator==(const char* className);
     61    bool                                  operator<(ClassID classID) { return this->classID < classID; };
     62
    6163    inline ClassID                        getLeafClassID() const { return this->classID; };
    6264
Note: See TracChangeset for help on using the changeset viewer.