Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jan 17, 2016, 10:29:21 PM (8 years ago)
Author:
landauf
Message:

merged branch cpp11_v3 back to trunk

Location:
code/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/trunk

  • code/trunk/src/libraries/core/ClassTreeMask.h

    r10693 r11071  
    152152            ClassTreeMaskNode* operator*() const;
    153153            ClassTreeMaskNode* operator->() const;
    154             operator bool() const;
     154            explicit operator bool() const;
    155155            bool operator==(ClassTreeMaskNode* compare) const;
    156156            bool operator!=(ClassTreeMaskNode* compare) const;
    157157
    158158        private:
    159             std::stack<std::pair<std::list<ClassTreeMaskNode*>::iterator, std::list<ClassTreeMaskNode*>::iterator> > nodes_;    ///< A stack to store list-iterators
     159            std::stack<std::pair<std::list<ClassTreeMaskNode*>::iterator, std::list<ClassTreeMaskNode*>::iterator>> nodes_;    ///< A stack to store list-iterators
    160160            std::list<ClassTreeMaskNode*> rootlist_;                                                                            ///< A list for internal use (it only stores the root-node)
    161161    };
     
    211211            inline const ClassTreeMask& begin() const { return (*this); }
    212212            /// End of the ClassTreeMaskObjectIterator.
    213             inline BaseObject*          end()   const { return 0; }
     213            inline BaseObject*          end()   const { return nullptr; }
    214214
    215215            ClassTreeMask& operator=(const ClassTreeMask& other);
     
    276276        public:
    277277            /// Default-constructor: Does nothing.
    278             inline ClassTreeMaskObjectIterator() {}
     278            inline ClassTreeMaskObjectIterator() = default;
    279279            /// Copy-Constructor: Initializes the iterator from another ClassTreeMask.
    280280            inline ClassTreeMaskObjectIterator(const ClassTreeMask& mask) { (*this) = mask; }
     
    285285
    286286            /// Returns true if the ClassTreeMaskObjectIterator points at the given object.
    287             inline bool operator==(BaseObject* pointer) const { return (this->objectIterator_ && (*this->objectIterator_) == pointer) || (!this->objectIterator_ && pointer == 0); }
     287            inline bool operator==(BaseObject* pointer) const { return (this->objectIterator_ && (*this->objectIterator_) == pointer) || (!this->objectIterator_ && pointer == nullptr); }
    288288            /// Returns true if the ClassTreeMaskObjectIterator doesn't point at the given object.
    289             inline bool operator!=(BaseObject* pointer) const { return (this->objectIterator_ && (*this->objectIterator_) != pointer) || (!this->objectIterator_ && pointer != 0); }
     289            inline bool operator!=(BaseObject* pointer) const { return (this->objectIterator_ && (*this->objectIterator_) != pointer) || (!this->objectIterator_ && pointer != nullptr); }
    290290            /// Returns true if the ClassTreeMaskObjectIterator hasn't already reached the end.
    291             inline operator bool() const { return (this->objectIterator_); }
     291            inline explicit operator bool() const { return this->objectIterator_.operator bool(); }
    292292            /// Returns the object the ClassTreeMaskObjectIterator currently points at.
    293293            inline BaseObject* operator*() const { return (*this->objectIterator_); }
     
    298298            void create(ClassTreeMaskNode* node);
    299299
    300             std::list<std::pair<const Identifier*, bool> >           subclasses_;       ///< A list of all Identifiers through which objects the iterator should iterate
    301             std::list<std::pair<const Identifier*, bool> >::iterator subclassIterator_; ///< The current class of the iterator
    302             Iterator<BaseObject>                                     objectIterator_;   ///< The current object of the iterator
     300            std::list<std::pair<const Identifier*, bool>>           subclasses_;       ///< A list of all Identifiers through which objects the iterator should iterate
     301            std::list<std::pair<const Identifier*, bool>>::iterator subclassIterator_; ///< The current class of the iterator
     302            Iterator<BaseObject>                                    objectIterator_;   ///< The current object of the iterator
    303303    };
    304304}
Note: See TracChangeset for help on using the changeset viewer.