summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
Diffstat (limited to 'utils')
-rw-r--r--utils/mir_buffer.h6
-rw-r--r--utils/mir_options.cpp6
-rw-r--r--utils/mir_smileys.cpp6
-rw-r--r--utils/std_string_utils.cpp6
-rw-r--r--utils/utf8_helpers.h16
5 files changed, 20 insertions, 20 deletions
diff --git a/utils/mir_buffer.h b/utils/mir_buffer.h
index 6c58b538d2..584ca12149 100644
--- a/utils/mir_buffer.h
+++ b/utils/mir_buffer.h
@@ -457,14 +457,14 @@ static void ReplaceVars(Buffer<TCHAR> *buffer, MCONTACT hContact, TCHAR **variab
if (buffer->str[j] == _T('%'))
{
size_t foundLen = i - j + 1;
- if (foundLen == 9 && _tcsncmp(&buffer->str[j], _T("%contact%"), 9) == 0)
+ if (foundLen == 9 && _tcsncmp(&buffer->str[j], L"%contact%", 9) == 0)
{
buffer->replace(j, i + 1, pcli->pfnGetContactDisplayName(hContact, 0));
}
- else if (foundLen == 6 && _tcsncmp(&buffer->str[j], _T("%date%"), 6) == 0)
+ else if (foundLen == 6 && _tcsncmp(&buffer->str[j], L"%date%", 6) == 0)
{
TCHAR tmp[128];
- TimeZone_ToStringT(time(NULL), _T("d s"), tmp, _countof(tmp));
+ TimeZone_ToStringT(time(NULL), L"d s", tmp, _countof(tmp));
buffer->replace(j, i + 1, tmp);
}
else
diff --git a/utils/mir_options.cpp b/utils/mir_options.cpp
index acf9ff9531..afdc407708 100644
--- a/utils/mir_options.cpp
+++ b/utils/mir_options.cpp
@@ -71,7 +71,7 @@ static void PathToRelative(TCHAR *pOut, size_t outSize, const TCHAR *pSrc)
if (dbPath[0] == _T('\0')) {
char tmp[1024];
CallService(MS_DB_GETPROFILEPATH, _countof(tmp), (LPARAM)tmp);
- mir_sntprintf(dbPath, _T("%S\\"), tmp);
+ mir_sntprintf(dbPath, L"%S\\", tmp);
}
size_t len = mir_tstrlen(dbPath);
@@ -89,10 +89,10 @@ static void PathToAbsolute(TCHAR *pOut, size_t outSize, const TCHAR *pSrc)
if (dbPath[0] == _T('\0')) {
char tmp[1024];
CallService(MS_DB_GETPROFILEPATH, _countof(tmp), (LPARAM)tmp);
- mir_sntprintf(dbPath, _T("%S\\"), tmp);
+ mir_sntprintf(dbPath, L"%S\\", tmp);
}
- mir_sntprintf(pOut, outSize, _T("%s%s"), dbPath, pSrc);
+ mir_sntprintf(pOut, outSize, L"%s%s", dbPath, pSrc);
}
}
diff --git a/utils/mir_smileys.cpp b/utils/mir_smileys.cpp
index 375a5bba64..a337b5b2f1 100644
--- a/utils/mir_smileys.cpp
+++ b/utils/mir_smileys.cpp
@@ -276,7 +276,7 @@ void DrawTextSmiley(HDC hdcMem, RECT free_rc, const TCHAR *szText, int len, Sort
i = 0;
// Get real height of the line
- text_height = skin_DrawText(hdcMem, _T("A"), 1, &tmp_rc, DT_CALCRECT | uTextFormat);
+ text_height = skin_DrawText(hdcMem, L"A", 1, &tmp_rc, DT_CALCRECT | uTextFormat);
if (uTextFormat & DT_RESIZE_SMILEYS)
row_height = text_height;
else
@@ -285,7 +285,7 @@ void DrawTextSmiley(HDC hdcMem, RECT free_rc, const TCHAR *szText, int len, Sort
// Just draw ellipsis
if (free_rc.right <= free_rc.left)
{
- skin_DrawText(hdcMem, _T("..."), 3, &free_rc, uTextFormat & ~DT_END_ELLIPSIS);
+ skin_DrawText(hdcMem, L"...", 3, &free_rc, uTextFormat & ~DT_END_ELLIPSIS);
}
else
{
@@ -349,7 +349,7 @@ void DrawTextSmiley(HDC hdcMem, RECT free_rc, const TCHAR *szText, int len, Sort
else
{
text_rc.top += (row_height - text_height) >> 1;
- skin_DrawText(hdcMem, _T("..."), 3, &text_rc, uTextFormat);
+ skin_DrawText(hdcMem, L"...", 3, &text_rc, uTextFormat);
}
pos_x += (LONG)(piece->smiley_width * factor);
diff --git a/utils/std_string_utils.cpp b/utils/std_string_utils.cpp
index be23aaeeeb..5991106b45 100644
--- a/utils/std_string_utils.cpp
+++ b/utils/std_string_utils.cpp
@@ -381,17 +381,17 @@ std::string utils::text::source_get_form_data(std::string* data, boolean hiddenO
std::tstring utils::text::prepare_name(const std::tstring &name, bool withSurnameLetter)
{
- std::tstring::size_type pos = name.find(_T(" "));
+ std::tstring::size_type pos = name.find(L" ");
if (pos == std::tstring::npos)
return name;
std::tstring result = name.substr(0, pos);
if (withSurnameLetter) {
- pos = name.rfind(_T(" ")) + 1; // we're sure there is some space in name so we can do +1 safely
+ pos = name.rfind(L" ") + 1; // we're sure there is some space in name so we can do +1 safely
if (pos < name.length())
- result += _T(" ") + name.substr(pos, 1) + std::tstring(_T("."));
+ result += L" " + name.substr(pos, 1) + std::tstring(L".");
}
return result;
diff --git a/utils/utf8_helpers.h b/utils/utf8_helpers.h
index 25e243c203..4928f04557 100644
--- a/utils/utf8_helpers.h
+++ b/utils/utf8_helpers.h
@@ -33,11 +33,11 @@ public:
{
int size = MultiByteToWideChar(CP_ACP, 0, str, -1, NULL, 0);
if (size <= 0)
- throw _T("Could not convert string to WCHAR");
+ throw L"Could not convert string to WCHAR";
WCHAR *tmp = (WCHAR *) mir_alloc(size * sizeof(WCHAR));
if (tmp == NULL)
- throw _T("mir_alloc returned NULL");
+ throw L"mir_alloc returned NULL";
MultiByteToWideChar(CP_ACP, 0, str, -1, tmp, size);
@@ -88,11 +88,11 @@ private:
{
int size = WideCharToMultiByte(CP_UTF8, 0, str, -1, NULL, 0, NULL, NULL);
if (size <= 0)
- throw _T("Could not convert string to UTF8");
+ throw L"Could not convert string to UTF8";
utf8 = (char *) mir_alloc(size);
if (utf8 == NULL)
- throw _T("mir_alloc returned NULL");
+ throw L"mir_alloc returned NULL";
WideCharToMultiByte(CP_UTF8, 0, str, -1, utf8, size, NULL, NULL);
}
@@ -110,11 +110,11 @@ public:
int size = MultiByteToWideChar(CP_UTF8, 0, str, -1, NULL, 0);
if (size <= 0)
- throw _T("Could not convert string to WCHAR");
+ throw L"Could not convert string to WCHAR";
WCHAR *tmp = (WCHAR *) mir_alloc(size * sizeof(WCHAR));
if (tmp == NULL)
- throw _T("mir_alloc returned NULL");
+ throw L"mir_alloc returned NULL";
MultiByteToWideChar(CP_UTF8, 0, str, -1, tmp, size);
@@ -128,14 +128,14 @@ public:
if (size <= 0)
{
mir_free(tmp);
- throw _T("Could not convert string to ACP");
+ throw L"Could not convert string to ACP";
}
tchar = (TCHAR *) mir_alloc(size * sizeof(char));
if (tchar == NULL)
{
mir_free(tmp);
- throw _T("mir_alloc returned NULL");
+ throw L"mir_alloc returned NULL";
}
WideCharToMultiByte(CP_ACP, 0, tmp, -1, tchar, size, NULL, NULL);