Base: Add isNullOrEmpty string helper
This adds isNullOrEmpty string helper that cheks if string is... well null or empty. It is done to improve readability of the code and better express intent.
This commit is contained in:
@@ -35,6 +35,7 @@
|
||||
|
||||
#include "ConsoleObserver.h"
|
||||
#include "Interpreter.h"
|
||||
#include "Tools.h"
|
||||
|
||||
|
||||
using namespace Base;
|
||||
@@ -343,7 +344,7 @@ std::stringstream& LogLevel::prefix(std::stringstream& str, const char* src, int
|
||||
#endif
|
||||
}
|
||||
}
|
||||
if (print_src && src && src[0]) {
|
||||
if (print_src && !Base::Tools::isNullOrEmpty(src)) {
|
||||
#ifdef FC_OS_WIN32
|
||||
const char* _f = std::strrchr(src, '\\');
|
||||
#else
|
||||
|
||||
Reference in New Issue
Block a user