diff options
author | George Hazan <george.hazan@gmail.com> | 2016-07-26 09:20:25 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2016-07-26 09:20:25 +0000 |
commit | 6e53dfca72b932c4bdcd7aa02ca62bf8b2630eac (patch) | |
tree | 2e8bb660c908b54914abd562af8aafa4a486c846 /plugins/Quotes/src/SettingsDlg.cpp | |
parent | a61c8728b379057fe7f0a0d86fe0b037598229dd (diff) |
less TCHARs:
- TCHAR is replaced with wchar_t everywhere;
- LPGENT replaced with either LPGENW or LPGEN;
- fixes for ANSI plugins that improperly used _t functions;
- TCHAR *t removed from MAllStrings;
- ptszGroup, ptszTitle & ptszTab in OPTIONSDIALOGPAGE replaced with pwsz*
git-svn-id: http://svn.miranda-ng.org/main/trunk@17133 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Quotes/src/SettingsDlg.cpp')
-rw-r--r-- | plugins/Quotes/src/SettingsDlg.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/plugins/Quotes/src/SettingsDlg.cpp b/plugins/Quotes/src/SettingsDlg.cpp index ee548a211e..5e8b0f0751 100644 --- a/plugins/Quotes/src/SettingsDlg.cpp +++ b/plugins/Quotes/src/SettingsDlg.cpp @@ -82,25 +82,25 @@ void update_all_controls(HWND hDlg) ::EnableWindow(::GetDlgItem(hDlg, IDC_BUTTON_POPUP_SETTINGS), (bIsCheckedContactSpec&&bIsPopupServiceEnabled));
}
-std::vector<TCHAR> get_filter()
+std::vector<wchar_t> get_filter()
{
- std::vector<TCHAR> aFilter;
- LPCTSTR pszFilterParts[] = { LPGENT("Log Files (*.txt,*.log)"), L"*.txt;*.log", LPGENT("All files (*.*)"), L"*.*" };
+ std::vector<wchar_t> aFilter;
+ LPCTSTR pszFilterParts[] = { LPGENW("Log Files (*.txt,*.log)"), L"*.txt;*.log", LPGENW("All files (*.*)"), L"*.*" };
for (int i = 0; i < sizeof(pszFilterParts) / sizeof(pszFilterParts[0]); ++i) {
tstring sPart = TranslateTS(pszFilterParts[i]);
std::copy(sPart.begin(), sPart.end(), std::back_inserter(aFilter));
- aFilter.push_back(_T('\0'));
+ aFilter.push_back('\0');
}
- aFilter.push_back(_T('\0'));
+ aFilter.push_back('\0');
return aFilter;
}
void select_log_file(HWND hDlg)
{
- std::vector<TCHAR> aFileBuffer(_MAX_PATH * 2, _T('\0'));
+ std::vector<wchar_t> aFileBuffer(_MAX_PATH * 2, '\0');
LPTSTR pszFile = &*aFileBuffer.begin();
- std::vector<TCHAR> aFilterBuffer = get_filter();
+ std::vector<wchar_t> aFilterBuffer = get_filter();
LPCTSTR pszFilter = &*aFilterBuffer.begin();
OPENFILENAME ofn = { 0 };
@@ -957,7 +957,7 @@ bool ShowSettingsDlg(HWND hWndParent, CAdvProviderSettings* pAdvSettings) static void replace_invalid_char(tstring::value_type& rChar, tstring::value_type repl)
{
- static const TCHAR charInvalidSigns[] = { _T('\\'), _T('/'), _T(':'), _T('*'), _T('?'), _T('\"'), _T('<'), _T('>'), _T('|') };
+ static const wchar_t charInvalidSigns[] = { '\\', '/', ':', '*', '?', '\"', '<', '>', '|' };
for (int i = 0; i < sizeof(charInvalidSigns) / sizeof(charInvalidSigns[0]); ++i) {
if (rChar == charInvalidSigns[i]) {
@@ -976,13 +976,13 @@ tstring GenerateLogFileName(const tstring &rsLogFilePattern, const tstring &rsQu tstring::size_type n = sPath.find(g_pszVariableQuoteName);
if (tstring::npos != n) {
tstring s = rsQuoteSymbol;
- std::for_each(s.begin(), s.end(), boost::bind(replace_invalid_char, _1, _T('_')));
+ std::for_each(s.begin(), s.end(), boost::bind(replace_invalid_char, _1, '_'));
sPath.replace(n, mir_tstrlen(g_pszVariableQuoteName), s.c_str());
}
}
if (nFlags & glfnResolveUserProfile) {
- TCHAR *ptszParsedName = Utils_ReplaceVarsT(sPath.c_str());
+ wchar_t *ptszParsedName = Utils_ReplaceVarsT(sPath.c_str());
if (ptszParsedName) {
sPath = ptszParsedName;
mir_free(ptszParsedName);
|