- code cleanup (removing / commenting uneeded items)
This commit is contained in:
parent
d07e5ef859
commit
26afb589a3
|
@ -232,7 +232,7 @@ void ChatManager::keyPress(SDL_KeyboardEvent c) {
|
|||
}
|
||||
text += buf;
|
||||
|
||||
printf("text length = %d\n",text.length());
|
||||
//printf("text length = %d\n",text.length());
|
||||
|
||||
SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] [%d] szCharText [%s]\n",__FILE__,__FUNCTION__,__LINE__, key,text.c_str());
|
||||
|
||||
|
|
|
@ -1299,10 +1299,12 @@ void MenuStateCustomGame::PlayNow(bool saveGame) {
|
|||
Lang &lang= Lang::getInstance();
|
||||
char szMsg[1024]="";
|
||||
if(lang.hasString("NetworkSlotUnassignedErrorUI") == true) {
|
||||
sprintf(szMsg,lang.get("NetworkSlotUnassignedErrorUI").c_str());
|
||||
//sprintf(szMsg,lang.get("NetworkSlotUnassignedErrorUI").c_str());
|
||||
strcpy(szMsg,lang.get("NetworkSlotUnassignedErrorUI").c_str());
|
||||
}
|
||||
else {
|
||||
sprintf(szMsg,"Cannot start game.\nSome player(s) are not in a network game slot!");
|
||||
//sprintf(szMsg,"Cannot start game.\nSome player(s) are not in a network game slot!");
|
||||
strcpy(szMsg,"Cannot start game.\nSome player(s) are not in a network game slot!");
|
||||
}
|
||||
|
||||
showMessageBox(szMsg, "", false);
|
||||
|
@ -1311,10 +1313,12 @@ void MenuStateCustomGame::PlayNow(bool saveGame) {
|
|||
for(unsigned int j = 0; j < languageList.size(); ++j) {
|
||||
char szMsg[1024]="";
|
||||
if(lang.hasString("NetworkSlotUnassignedError",languageList[j]) == true) {
|
||||
sprintf(szMsg,lang.get("NetworkSlotUnassignedError").c_str());
|
||||
//sprintf(szMsg,lang.get("NetworkSlotUnassignedError").c_str());
|
||||
strcpy(szMsg,lang.get("NetworkSlotUnassignedError").c_str());
|
||||
}
|
||||
else {
|
||||
sprintf(szMsg,"Cannot start game, some player(s) are not in a network game slot!");
|
||||
//sprintf(szMsg,"Cannot start game, some player(s) are not in a network game slot!");
|
||||
strcpy(szMsg,"Cannot start game, some player(s) are not in a network game slot!");
|
||||
}
|
||||
|
||||
serverInterface->sendTextMessage(szMsg,-1, true,languageList[j]);
|
||||
|
|
|
@ -25,13 +25,6 @@
|
|||
# include <string>
|
||||
#include "types.h"
|
||||
|
||||
/*!
|
||||
** \brief Force the Use of the Boost functions
|
||||
*/
|
||||
# define TA3D_USE_BOOST 0
|
||||
|
||||
|
||||
|
||||
//! \name Macros for Shared::Util::String
|
||||
//@{
|
||||
|
||||
|
|
|
@ -40,9 +40,9 @@ bool Font::fontIsRightToLeft = false;
|
|||
|
||||
// This value is used to scale the font text rendering
|
||||
// in 3D render mode
|
||||
float Font::scaleFontValue = 0.80;
|
||||
float Font::scaleFontValue = 0.80f;
|
||||
// This value is used for centering font text vertically (height)
|
||||
float Font::scaleFontValueCenterHFactor = 4.0;
|
||||
float Font::scaleFontValueCenterHFactor = 4.0f;
|
||||
//float Font::scaleFontValue = 1.0;
|
||||
//float Font::scaleFontValueCenterHFactor = 4.0;
|
||||
|
||||
|
|
|
@ -234,6 +234,7 @@ void TextFTGL::Render(const char* str, const int len) {
|
|||
if(len != 0) {
|
||||
//printf("FTGL Render [%s] facesize = %d\n",str,ftFont->FaceSize());
|
||||
assertGl();
|
||||
|
||||
ftFont->Render(str, len);
|
||||
//assertGl();
|
||||
GLenum error = glGetError();
|
||||
|
|
|
@ -18,21 +18,12 @@
|
|||
//#include "../stdafx.h"
|
||||
#include "string_utils.h"
|
||||
|
||||
#if TA3D_USE_BOOST == 1
|
||||
# include <boost/algorithm/string.hpp>
|
||||
# include <boost/algorithm/string/trim.hpp>
|
||||
# include <boost/algorithm/string/split.hpp>
|
||||
#else
|
||||
#include <algorithm>
|
||||
#endif
|
||||
|
||||
#include <assert.h>
|
||||
//#include "../logs/logs.h"
|
||||
|
||||
|
||||
namespace Shared { namespace Util {
|
||||
|
||||
#if TA3D_USE_BOOST != 1
|
||||
namespace
|
||||
{
|
||||
int stdLowerCase (int c)
|
||||
|
@ -45,7 +36,6 @@ namespace Shared { namespace Util {
|
|||
return toupper(c);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
String&
|
||||
String::operator << (const wchar_t* v)
|
||||
|
@ -66,22 +56,14 @@ namespace Shared { namespace Util {
|
|||
String&
|
||||
String::toLower()
|
||||
{
|
||||
#if TA3D_USE_BOOST == 1
|
||||
boost::to_lower(*this);
|
||||
#else
|
||||
std::transform (this->begin(), this->end(), this->begin(), stdLowerCase);
|
||||
#endif
|
||||
return *this;
|
||||
}
|
||||
|
||||
String&
|
||||
String::toUpper()
|
||||
{
|
||||
#if TA3D_USE_BOOST == 1
|
||||
boost::to_upper(*this);
|
||||
#else
|
||||
std::transform (this->begin(), this->end(), this->begin(), stdUpperCase);
|
||||
#endif
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
@ -120,15 +102,6 @@ namespace Shared { namespace Util {
|
|||
// Empty the container
|
||||
if (emptyBefore)
|
||||
out.clear();
|
||||
#if TA3D_USE_BOOST == 1
|
||||
// TODO : Avoid string duplication
|
||||
// Split
|
||||
std::vector<std::string> v;
|
||||
boost::algorithm::split(v, *this, boost::is_any_of(separators.c_str()));
|
||||
// Copying
|
||||
for(std::vector<std::string>::const_iterator i = v.begin(); i != v.end(); ++i)
|
||||
out.push_back(*i);
|
||||
#else
|
||||
// TODO This method should be rewritten for better performance
|
||||
String s(*this);
|
||||
while (!s.empty())
|
||||
|
@ -145,7 +118,6 @@ namespace Shared { namespace Util {
|
|||
s = s.substr(i + 1, s.size() - i - 1);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -154,15 +126,6 @@ namespace Shared { namespace Util {
|
|||
// Empty the container
|
||||
if (emptyBefore)
|
||||
out.clear();
|
||||
#if TA3D_USE_BOOST == 1
|
||||
// TODO : Avoid string duplication
|
||||
// Split
|
||||
std::vector<std::string> v;
|
||||
boost::algorithm::split(v, *this, boost::is_any_of(separators.c_str()));
|
||||
// Copying
|
||||
for(std::vector<std::string>::const_iterator i = v.begin(); i != v.end(); ++i)
|
||||
out.push_back(*i);
|
||||
#else
|
||||
// TODO This method should be rewritten for better performance
|
||||
String s(*this);
|
||||
while (!s.empty())
|
||||
|
@ -179,7 +142,6 @@ namespace Shared { namespace Util {
|
|||
s = s.substr(i + 1, s.size() - i - 1);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user