Fix potential ambiguity between XT locale and std::locale in Str()

This commit is contained in:
palana 2014-03-14 18:16:42 +01:00
parent 3ce7d1c08b
commit 8abcff0c89
2 changed files with 2 additions and 6 deletions

View File

@ -26,8 +26,6 @@
#include <memory> #include <memory>
using namespace std;
namespace namespace
{ {
struct HTTPHandleDeleter struct HTTPHandleDeleter
@ -35,7 +33,7 @@ namespace
void operator()(HINTERNET h) { WinHttpCloseHandle(h); } void operator()(HINTERNET h) { WinHttpCloseHandle(h); }
}; };
struct HTTPHandle : unique_ptr<void, HTTPHandleDeleter> struct HTTPHandle : std::unique_ptr<void, HTTPHandleDeleter>
{ {
explicit HTTPHandle(HINTERNET h=nullptr) : unique_ptr(h) {} explicit HTTPHandle(HINTERNET h=nullptr) : unique_ptr(h) {}
operator HINTERNET() { return get(); } operator HINTERNET() { return get(); }

View File

@ -398,8 +398,6 @@ namespace
void SettingsPublish::OptimizeSettings() void SettingsPublish::OptimizeSettings()
{ {
using namespace std;
auto refresh_on_exit = onScopeExit([&] { SetWarningInfo(); }); auto refresh_on_exit = onScopeExit([&] { SetWarningInfo(); });
XConfig serverData; XConfig serverData;
if (!serverData.Open(L"services.xconfig")) if (!serverData.Open(L"services.xconfig"))
@ -430,7 +428,7 @@ void SettingsPublish::OptimizeSettings()
if (!r) if (!r)
return; return;
typedef vector<function<void()>> optimizers_t; using optimizers_t = std::vector<std::function<void()>>;
optimizers_t optimizers; optimizers_t optimizers;
String changes = Str("Settings.Publish.Optimize.Optimizations"); String changes = Str("Settings.Publish.Optimize.Optimizations");