Index: include/FUtils/FUStringBuilder.h =================================================================== --- include/FUtils/FUStringBuilder.h +++ include/FUtils/FUStringBuilder.h @@ -135,6 +135,8 @@ #else inline void append(unsigned int i) { append((uint32) i); } /**< See above. */ #endif +#elif defined(__APPLE__) || defined(__OpenBSD__) + inline void append(size_t i) { append((uint64)i); } #endif // defined(WIN32) /** Appends the floating-point value, after converting it to a string, Index: include/FUtils/FUTracker.h =================================================================== --- include/FUtils/FUTracker.h +++ include/FUtils/FUTracker.h @@ -116,10 +116,10 @@ /** Copy constructor. @param _ptr The object to track. This pointer can be NULL to indicate that no object should be tracked at this time. */ - FUTrackedPtr(ObjectClass* _ptr = NULL) : ptr(_ptr) + FUTrackedPtr(ObjectClass* _ptr = nullptr) : ptr(_ptr) { - if (ptr != NULL) FUTracker::TrackObject((FUTrackable*) ptr); - ptr = ptr; + if (ptr != nullptr) + FUTracker::TrackObject(static_cast ptr); } /** Destructor. Index: include/FUtils/Platforms.h =================================================================== --- include/FUtils/Platforms.h +++ include/FUtils/Platforms.h @@ -125,7 +125,7 @@ #endif // PLATFORMS // Important functions that some OSes have missing! -#if defined(__APPLE__) || defined(LINUX) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__OpenBSD__) +#if defined(__APPLE__) || defined (LINUX) || defined (__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__OpenBSD__) inline char* strlower(char* str) { char* it = str; while (*it != 0) { *it = tolower(*it); ++it; } return str; } inline wchar_t* wcslwr(wchar_t* str) { wchar_t* it = str; while (*it != 0) { *it = towlower(*it); ++it; } return str; } inline int wcsicmp(const wchar_t* s1, const wchar_t* s2) { wchar_t c1 = *s1, c2 = *s2; while (c1 != 0 && c2 != 0) { if (c1 >= 'a' && c1 <= 'z') c1 -= 'a' + 'A'; if (c2 >= 'a' && c2 <= 'z') c2 -= 'a' + 'A'; if (c2 < c1) return -1; else if (c2 > c1) return 1; c1 = *(++s1); c2 = *(++s2); } return 0; } @@ -139,7 +139,7 @@ #elif defined(__PPU__) #define glClearDepth glClearDepthf -#endif // __APPLE__ || LINUX || _FreeBSD__ || __FreeBSD_kernel__ || __OpenBSD__ +#endif // __APPLE__ and LINUX // Cross-platform needed functions #ifdef WIN32 Index: src/FCollada/FCDocument/FCDAnimation.cpp =================================================================== --- src/FCollada/FCDocument/FCDAnimation.cpp +++ src/FCollada/FCDocument/FCDAnimation.cpp @@ -117,7 +117,7 @@ void FCDAnimation::GetCurves(FCDAnimationCurveList& curves) { // Retrieve the curves for this animation tree element - for (const FCDAnimationChannel** it = (const FCDAnimationChannel**) channels.begin(); it != channels.end(); ++it) + for (const FCDAnimationChannel* const* it = channels.begin(); it != channels.end(); ++it) { size_t channelCurveCount = (*it)->GetCurveCount(); for (size_t i = 0; i < channelCurveCount; ++i) Index: src/FCollada/FCDocument/FCDControllerInstance.cpp =================================================================== --- src/FCollada/FCDocument/FCDControllerInstance.cpp +++ src/FCollada/FCDocument/FCDControllerInstance.cpp @@ -54,7 +54,7 @@ { skeletonRoots.clear(); - for (const FCDSceneNode** itJ = (const FCDSceneNode**) joints.begin(); itJ != joints.end(); ++itJ) + for (const FCDSceneNode* const* itJ = joints.begin(); itJ != joints.end(); ++itJ) { const FCDSceneNode* joint = (*itJ); if (joint == NULL) continue; Index: src/FCollada/FCDocument/FCDExtra.cpp =================================================================== --- src/FCollada/FCDocument/FCDExtra.cpp +++ src/FCollada/FCDocument/FCDExtra.cpp @@ -234,7 +234,7 @@ void FCDENode::FindParameters(FCDENodeList& nodes, StringList& names) { - for (const FCDENode** itN = (const FCDENode**) children.begin(); itN != children.end(); ++itN) + for (const FCDENode* const* itN = children.begin(); itN != children.end(); ++itN) { const FCDENode* node = (*itN); if (node->GetChildNodeCount() == 0) Index: src/FCollada/FCDocument/FCDMaterialInstance.cpp =================================================================== --- src/FCollada/FCDocument/FCDMaterialInstance.cpp +++ src/FCollada/FCDocument/FCDMaterialInstance.cpp @@ -116,7 +116,7 @@ const FCDMaterialInstanceBind* FCDMaterialInstance::FindBinding(const char* semantic) { - for (const FCDMaterialInstanceBind** it = (const FCDMaterialInstanceBind**) bindings.begin(); it != bindings.end(); ++it) + for (const FCDMaterialInstanceBind* const* it = bindings.begin(); it != bindings.end(); ++it) { if (IsEquivalent((*it)->semantic, semantic)) return (*it); } Index: src/FCollada/FCDocument/FCDocument.h =================================================================== --- src/FCollada/FCDocument/FCDocument.h +++ src/FCollada/FCDocument/FCDocument.h @@ -30,7 +30,7 @@ #if defined(WIN32) template class FCOLLADA_EXPORT FCDLibrary; /**< Trick Doxygen. */ template class FCOLLADA_EXPORT FUUniqueStringMapT; /**< Trick Doxygen. */ -#elif defined(LINUX) || defined(__APPLE__) || defined (__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__OpenBSD__) +#elif defined(LINUX) || defined(__APPLE__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__OpenBSD__) template class FCDLibrary; /**< Trick Doxygen. */ template class FUUniqueStringMapT; /**< Trick Doxygen. */ #endif // LINUX Index: src/FCollada/FUtils/FUTracker.h =================================================================== --- src/FCollada/FUtils/FUTracker.h +++ src/FCollada/FUtils/FUTracker.h @@ -116,10 +116,10 @@ /** Copy constructor. @param _ptr The object to track. This pointer can be NULL to indicate that no object should be tracked at this time. */ - FUTrackedPtr(ObjectClass* _ptr = NULL) : ptr(_ptr) + FUTrackedPtr(ObjectClass* _ptr = nullptr) : ptr(_ptr) { - if (ptr != NULL) FUTracker::TrackObject((FUTrackable*) ptr); - ptr = ptr; + if (ptr != nullptr) + FUTracker::TrackObject(static_cast ptr); } /** Destructor.