diff options
author | Kirill Volinsky <Mataes2007@gmail.com> | 2018-07-25 09:14:43 +0300 |
---|---|---|
committer | Kirill Volinsky <Mataes2007@gmail.com> | 2018-07-25 09:14:43 +0300 |
commit | 23729c4f6a62de7a71368ffdeeeb08470ff4731e (patch) | |
tree | 3b227636ac19cb7b1f200b52aec1121593713e4d /plugins/Quotes/src/CreateFilePath.cpp | |
parent | e62d2a2a86b0477537403a2316e629e8fea4a9d0 (diff) |
Quotes renamed to CurrencyRates
Diffstat (limited to 'plugins/Quotes/src/CreateFilePath.cpp')
-rw-r--r-- | plugins/Quotes/src/CreateFilePath.cpp | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/plugins/Quotes/src/CreateFilePath.cpp b/plugins/Quotes/src/CreateFilePath.cpp deleted file mode 100644 index f2a28621fb..0000000000 --- a/plugins/Quotes/src/CreateFilePath.cpp +++ /dev/null @@ -1,33 +0,0 @@ -#include "StdAfx.h"
-
-static wchar_t InvalidSymbols[] = { '\\', '/', ':', '*', '?', '"', '<', '>', '|' };
-
-static wchar_t replace_invalid_symbol(wchar_t chr)
-{
- for (int i = 0; i < _countof(InvalidSymbols); ++i)
- if (chr == InvalidSymbols[i])
- return '_';
-
- return chr;
-}
-
-void prepare_name(tstring& rsName)
-{
- std::transform(rsName.begin(), rsName.end(), rsName.begin(), boost::bind(replace_invalid_symbol, _1));
-}
-
-tstring CreateFilePath(const tstring& rsName)
-{
- wchar_t szPath[_MAX_PATH];
- ::GetModuleFileName(g_plugin.getInst(), szPath, _MAX_PATH);
-
- wchar_t* p = wcsrchr(szPath, '\\');
- if (p)
- *p = 0;
-
- tstring s(rsName);
- prepare_name(s);
- tostringstream o;
- o << szPath << L"\\Quotes\\" << s;
- return o.str();
-}
\ No newline at end of file |