Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix overload ambiguity problem wth StringConverter::toString #485

Merged
merged 1 commit into from
Dec 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading