Minor TString cleanup (also enable log terminal output in release mode)
This commit is contained in:
parent
5ffa24592c
commit
901ae6a832
|
@ -72,11 +72,6 @@ public:
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
// Forward declares of some static functions that are handy for internal use
|
|
||||||
//static bool CompareCStrings(const CharType*, const CharType*);
|
|
||||||
//static u32 CStringLength(const CharType*);
|
|
||||||
//static bool IsWhitespace(CharType);
|
|
||||||
|
|
||||||
// Data Accessors
|
// Data Accessors
|
||||||
inline const CharType* CString() const
|
inline const CharType* CString() const
|
||||||
{
|
{
|
||||||
|
@ -198,6 +193,7 @@ public:
|
||||||
|
|
||||||
_TString ToUpper() const
|
_TString ToUpper() const
|
||||||
{
|
{
|
||||||
|
// todo: doesn't handle accented characters
|
||||||
_TString out(Size());
|
_TString out(Size());
|
||||||
|
|
||||||
for (u32 iChar = 0; iChar < Size(); iChar++)
|
for (u32 iChar = 0; iChar < Size(); iChar++)
|
||||||
|
@ -215,6 +211,7 @@ public:
|
||||||
|
|
||||||
_TString ToLower() const
|
_TString ToLower() const
|
||||||
{
|
{
|
||||||
|
// todo: doesn't handle accented characters
|
||||||
_TString out(Size());
|
_TString out(Size());
|
||||||
|
|
||||||
for (u32 iChar = 0; iChar < Size(); iChar++)
|
for (u32 iChar = 0; iChar < Size(); iChar++)
|
||||||
|
|
|
@ -34,19 +34,13 @@ void Write(const TString& message)
|
||||||
void Error(const TString& message)
|
void Error(const TString& message)
|
||||||
{
|
{
|
||||||
Write("ERROR: " + message);
|
Write("ERROR: " + message);
|
||||||
|
std::cout << "ERROR: " << message << "\n";
|
||||||
#ifdef _DEBUG
|
|
||||||
std::cout << "ERROR: " << message << "\n";
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Warning(const TString& message)
|
void Warning(const TString& message)
|
||||||
{
|
{
|
||||||
Write("Warning: " + message);
|
Write("Warning: " + message);
|
||||||
|
|
||||||
#ifdef _DEBUG
|
|
||||||
std::cout << "Warning: " << message << "\n";
|
std::cout << "Warning: " << message << "\n";
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void FileWrite(const TString& filename, const TString& message)
|
void FileWrite(const TString& filename, const TString& message)
|
||||||
|
|
|
@ -3,7 +3,6 @@
|
||||||
#include <QStyleFactory>
|
#include <QStyleFactory>
|
||||||
#include <UI/CDarkStyle.h>
|
#include <UI/CDarkStyle.h>
|
||||||
#include <Resource/factory/CTemplateLoader.h>
|
#include <Resource/factory/CTemplateLoader.h>
|
||||||
#include <Common/TString.h>
|
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue