Skip to content

Commit

Permalink
Fix overload ambiguity problem wth StringConverter::toString
Browse files Browse the repository at this point in the history
  • Loading branch information
jwwalker authored and darksylinc committed Dec 16, 2024
1 parent ba6d3dc commit 7ba585e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 20 deletions.
14 changes: 4 additions & 10 deletions OgreMain/include/OgreStringConverter.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,23 +90,17 @@ namespace Ogre
/** Converts an int to a String. */
static String toString( int val, unsigned short width = 0, char fill = ' ',
std::ios::fmtflags flags = std::ios::fmtflags( 0 ) );
#if OGRE_ARCH_TYPE == OGRE_ARCHITECTURE_64 || OGRE_PLATFORM == OGRE_PLATFORM_APPLE || \
OGRE_PLATFORM == OGRE_PLATFORM_APPLE_IOS
/** Converts an unsigned int to a String. */
static String toString( unsigned int val, unsigned short width = 0, char fill = ' ',
std::ios::fmtflags flags = std::ios::fmtflags( 0 ) );
# if OGRE_COMPILER == OGRE_COMPILER_MSVC
/** Converts an unsigned long to a String. */
static String toString( unsigned long val, unsigned short width = 0, char fill = ' ',
std::ios::fmtflags flags = std::ios::fmtflags( 0 ) );
# endif
#else
/** Converts an unsigned long to a String. */
static String toString( unsigned long val, unsigned short width = 0, char fill = ' ',
/** Converts a long long to a String. */
static String toString( long long val, unsigned short width = 0, char fill = ' ',
std::ios::fmtflags flags = std::ios::fmtflags( 0 ) );
#endif
/** Converts a size_t to a String. */
static String toString( size_t val, unsigned short width = 0, char fill = ' ',
/** Converts an unsigned long long to a String. */
static String toString( unsigned long long val, unsigned short width = 0, char fill = ' ',
std::ios::fmtflags flags = std::ios::fmtflags( 0 ) );
/** Converts a long to a String. */
static String toString( long val, unsigned short width = 0, char fill = ' ',
Expand Down
13 changes: 3 additions & 10 deletions OgreMain/src/OgreStringConverter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -149,38 +149,31 @@ namespace Ogre
{
return _toString( val, width, fill, flags );
}
#if OGRE_ARCH_TYPE == OGRE_ARCHITECTURE_64 || OGRE_PLATFORM == OGRE_PLATFORM_APPLE || \
OGRE_PLATFORM == OGRE_PLATFORM_APPLE_IOS
//-----------------------------------------------------------------------
String StringConverter::toString( unsigned int val, unsigned short width, char fill,
std::ios::fmtflags flags )
{
return _toString( val, width, fill, flags );
}
# if OGRE_COMPILER == OGRE_COMPILER_MSVC
//-----------------------------------------------------------------------
String StringConverter::toString( unsigned long val, unsigned short width, char fill,
std::ios::fmtflags flags )
{
return _toString( val, width, fill, flags );
}
# endif
#else
//-----------------------------------------------------------------------
String StringConverter::toString( unsigned long val, unsigned short width, char fill,
String StringConverter::toString( long val, unsigned short width, char fill,
std::ios::fmtflags flags )
{
return _toString( val, width, fill, flags );
}
#endif
//-----------------------------------------------------------------------
String StringConverter::toString( size_t val, unsigned short width, char fill,
String StringConverter::toString( long long val, unsigned short width, char fill,
std::ios::fmtflags flags )
{
return _toString( val, width, fill, flags );
}
//-----------------------------------------------------------------------
String StringConverter::toString( long val, unsigned short width, char fill,
String StringConverter::toString( unsigned long long val, unsigned short width, char fill,
std::ios::fmtflags flags )
{
return _toString( val, width, fill, flags );
Expand Down

0 comments on commit 7ba585e

Please sign in to comment.