[7114] Code cleanups.

Remove redundant `inline` for in-class function definitions.
Fixed float -> int implicit casts.
This commit is contained in:
VladimirMangos 2009-01-19 15:08:06 +03:00
parent 9fba64aeae
commit 9e590f7ceb
22 changed files with 82 additions and 83 deletions

View file

@ -42,7 +42,7 @@ template <class TO, class FROM> class Reference : public LinkedListElement
virtual ~Reference() {}
// Create new link
inline void link(TO* toObj, FROM* fromObj)
void link(TO* toObj, FROM* fromObj)
{
assert(fromObj); // fromObj MUST not be NULL
if(isValid())
@ -57,16 +57,16 @@ template <class TO, class FROM> class Reference : public LinkedListElement
// We don't need the reference anymore. Call comes from the refFrom object
// Tell our refTo object, that the link is cut
inline void unlink() { targetObjectDestroyLink(); delink(); iRefTo = NULL; iRefFrom = NULL; }
void unlink() { targetObjectDestroyLink(); delink(); iRefTo = NULL; iRefFrom = NULL; }
// Link is invalid due to destruction of referenced target object. Call comes from the refTo object
// Tell our refFrom object, that the link is cut
inline void invalidate() // the iRefFrom MUST remain!!
void invalidate() // the iRefFrom MUST remain!!
{
sourceObjectDestroyLink(); delink(); iRefTo = NULL;
}
inline bool isValid() const // Only check the iRefTo
bool isValid() const // Only check the iRefTo
{
return iRefTo != NULL;
}
@ -81,10 +81,10 @@ template <class TO, class FROM> class Reference : public LinkedListElement
Reference<TO,FROM> * nocheck_prev() { return((Reference<TO,FROM> *) LinkedListElement::nocheck_prev()); }
Reference<TO,FROM> const * nocheck_prev() const { return((Reference<TO,FROM> const *) LinkedListElement::nocheck_prev()); }
inline TO* operator ->() const { return iRefTo; }
inline TO* getTarget() const { return iRefTo; }
TO* operator ->() const { return iRefTo; }
TO* getTarget() const { return iRefTo; }
inline FROM* getSource() const { return iRefFrom; }
FROM* getSource() const { return iRefFrom; }
};
//=====================================================