diff options
author | George Hazan <george.hazan@gmail.com> | 2012-07-18 14:11:28 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-07-18 14:11:28 +0000 |
commit | 4bc88d46fa9859615521f436511d4f102f20eb67 (patch) | |
tree | 3a6ee91b74be2a4f5e60520885aa601c74bc3fa7 /plugins/Dbx_tree/DataBase.cpp | |
parent | 4f8f5427687792492ee49e06cafb9bd50cfc53d4 (diff) |
databases are still static, but are controlled via classes
git-svn-id: http://svn.miranda-ng.org/main/trunk@1014 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Dbx_tree/DataBase.cpp')
-rw-r--r-- | plugins/Dbx_tree/DataBase.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/plugins/Dbx_tree/DataBase.cpp b/plugins/Dbx_tree/DataBase.cpp index 101d4b5d34..b685981037 100644 --- a/plugins/Dbx_tree/DataBase.cpp +++ b/plugins/Dbx_tree/DataBase.cpp @@ -29,13 +29,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. CDataBase *gDataBase = NULL;
-CDataBase::CDataBase(const char* FileName)
+CDataBase::CDataBase(const TCHAR *FileName)
{
- int len;
-
- len = MultiByteToWideChar(CP_ACP, 0, FileName, -1, NULL, 0);
+ int len = _tcslen(FileName);
m_FileName[0] = new TCHAR[len + 1];
- MultiByteToWideChar(CP_ACP, 0, FileName, -1, m_FileName[0], len + 1);
+ _tcsncpy_s(m_FileName[0], len + 1, FileName, len);
m_FileName[0][len] = 0;
|