Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: src/plugin/PluginSettings.cpp

Issue 6288156869525504: Issue #276 - eliminate CString from GetDataPath (Closed)
Patch Set: Created July 30, 2014, 8:59 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« src/plugin/PluginSettings.h ('K') | « src/plugin/PluginSettings.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #include "PluginStdAfx.h" 1 #include "PluginStdAfx.h"
2 2
3 #include <Wbemidl.h> 3 #include <Wbemidl.h>
4 #include <time.h> 4 #include <time.h>
5 #include "PluginSettings.h" 5 #include "PluginSettings.h"
6 #include "PluginClient.h" 6 #include "PluginClient.h"
7 #include "PluginSystem.h" 7 #include "PluginSystem.h"
8 #ifdef SUPPORT_FILTER 8 #ifdef SUPPORT_FILTER
9 #include "PluginFilter.h" 9 #include "PluginFilter.h"
10 #endif 10 #endif
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 92
93 s_criticalSectionLocal.Lock(); 93 s_criticalSectionLocal.Lock();
94 { 94 {
95 hasInstance = s_instance != NULL; 95 hasInstance = s_instance != NULL;
96 } 96 }
97 s_criticalSectionLocal.Unlock(); 97 s_criticalSectionLocal.Unlock();
98 98
99 return hasInstance; 99 return hasInstance;
100 } 100 }
101 101
102 CString CPluginSettings::GetDataPath(const CString& filename) 102 std::wstring GetDataPath(const std::wstring& filename)
103 { 103 {
104 std::wstring path = ::GetAppDataPath() + L"\\" + static_cast<LPCWSTR>(filename ); 104 return GetAppDataPath() + L"\\" + filename;
105 return CString(path.c_str());
106 } 105 }
107 106
108 bool CPluginSettings::IsPluginEnabled() const 107 bool CPluginSettings::IsPluginEnabled() const
109 { 108 {
110 return GetPluginEnabled(); 109 return GetPluginEnabled();
111 } 110 }
112 111
113 std::map<CString, CString> CPluginSettings::GetFilterLanguageTitleList() const 112 std::map<CString, CString> CPluginSettings::GetFilterLanguageTitleList() const
114 { 113 {
115 std::vector<SubscriptionDescription> subscriptions = CPluginClient::GetInstanc e()->FetchAvailableSubscriptions(); 114 std::vector<SubscriptionDescription> subscriptions = CPluginClient::GetInstanc e()->FetchAvailableSubscriptions();
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 } 293 }
295 294
296 CString CPluginSettings::GetDocumentationLink() 295 CString CPluginSettings::GetDocumentationLink()
297 { 296 {
298 return CString(CPluginClient::GetInstance()->GetDocumentationLink().c_str()); 297 return CString(CPluginClient::GetInstance()->GetDocumentationLink().c_str());
299 } 298 }
300 299
301 300
302 301
303 #endif // SUPPORT_WHITELIST 302 #endif // SUPPORT_WHITELIST
OLDNEW
« src/plugin/PluginSettings.h ('K') | « src/plugin/PluginSettings.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld