summaryrefslogtreecommitdiff
path: root/plugins/Dbx_tree
diff options
context:
space:
mode:
authorVadim Dashevskiy <watcherhd@gmail.com>2012-06-15 18:52:16 +0000
committerVadim Dashevskiy <watcherhd@gmail.com>2012-06-15 18:52:16 +0000
commit58973a21a30bf95427fd43c456e41e35c386218c (patch)
tree1413fba069ecd351b2c99fa5a53e52c68d8a662c /plugins/Dbx_tree
parent55b5cf8a5506f03350e5c80ac86f5717425e4d10 (diff)
another portion of "#ifsef Unicode" removal
git-svn-id: http://svn.miranda-ng.org/main/trunk@434 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Dbx_tree')
-rw-r--r--plugins/Dbx_tree/DataBase.cpp8
-rw-r--r--plugins/Dbx_tree/Logger.h11
2 files changed, 6 insertions, 13 deletions
diff --git a/plugins/Dbx_tree/DataBase.cpp b/plugins/Dbx_tree/DataBase.cpp
index 85a9d67ccb..101d4b5d34 100644
--- a/plugins/Dbx_tree/DataBase.cpp
+++ b/plugins/Dbx_tree/DataBase.cpp
@@ -32,16 +32,12 @@ CDataBase *gDataBase = NULL;
CDataBase::CDataBase(const char* FileName)
{
int len;
-#ifdef UNICODE
+
len = MultiByteToWideChar(CP_ACP, 0, FileName, -1, NULL, 0);
m_FileName[0] = new TCHAR[len + 1];
MultiByteToWideChar(CP_ACP, 0, FileName, -1, m_FileName[0], len + 1);
m_FileName[0][len] = 0;
-#else
- len = strlen(FileName);
- m_FileName[0] = new TCHAR[len + 1];
- strcpy_s(m_FileName[0], len + 1, FileName);
-#endif
+
TCHAR * tmp = _tcsrchr(m_FileName[0], '.');
if (tmp)
diff --git a/plugins/Dbx_tree/Logger.h b/plugins/Dbx_tree/Logger.h
index 5c88cc7ebf..a97b928555 100644
--- a/plugins/Dbx_tree/Logger.h
+++ b/plugins/Dbx_tree/Logger.h
@@ -31,13 +31,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#define __WFILE__ WIDEN(__FILE__)
#define __WFUNCTION__ WIDEN(__FUNCTION__)
-#ifdef UNICODE
- #define LOG(Level, Message, ...) CLogger::Instance().Append(__WFILE__, __WFUNCTION__, __LINE__, 0, CLogger:: ## Level, Message, __VA_ARGS__)
- #define LOGSYS(Level, Message, ...) CLogger::Instance().Append(__WFILE__, __WFUNCTION__, __LINE__, GetLastError(), CLogger:: ## Level, Message, __VA_ARGS__)
-#else
- #define LOG(Level, Message, ...) CLogger::Instance().Append(__FILE__, __FUNCTION__, __LINE__, 0, CLogger:: ## Level, Message, __VA_ARGS__)
- #define LOGSYS(Level, Message, ...) CLogger::Instance().Append(__FILE__, __FUNCTION__, __LINE__, GetLastError(), CLogger:: ## Level, Message, __VA_ARGS__)
-#endif
+
+#define LOG(Level, Message, ...) CLogger::Instance().Append(__WFILE__, __WFUNCTION__, __LINE__, 0, CLogger:: ## Level, Message, __VA_ARGS__)
+#define LOGSYS(Level, Message, ...) CLogger::Instance().Append(__WFILE__, __WFUNCTION__, __LINE__, GetLastError(), CLogger:: ## Level, Message, __VA_ARGS__)
+
#define CHECK(Assertion, Level, Message, ...) if (!(Assertion)) LOG(Level, Message, __VA_ARGS__)
#define CHECKSYS(Assertion, Level, Message, ...) if (!(Assertion)) LOGSYS(Level, Message, __VA_ARGS__)