Fix C++11 usage in native with platform-specific hacks.

This commit is contained in:
Sacha committed 2013-06-02 13:06:40 +10:00
1 parent 4267d9903c
commit 58c40dabb1
6 files changed
+49 -56

No files matched your search

+3 -4
View File
@@ -19,7 +19,6 @@
#include "base/stringutil.h"
#include "net/resolve.h"
#include "net/url.h"
#include "base/functional.h"
// #include "strings/strutil.h"
@@ -175,7 +174,7 @@ int Client::POST(const char *resource, const std::string &data, Buffer *output)
Download::Download(const std::string &url, const std::string &outfile)
: url_(url), outfile_(outfile), progress_(0.0f), failed_(false) {
std::thread th(std::bind(&Download::Do, this));
std::thread th(bind(&Download::Do, this));
th.detach();
}
@@ -211,8 +210,8 @@ void Download::Do() {
net::Shutdown();
}
std::shared_ptr<Download> Downloader::StartDownload(const std::string &url, const std::string &outfile) {
std::shared_ptr<Download> dl(new Download(url, outfile));
shared_ptr<Download> Downloader::StartDownload(const std::string &url, const std::string &outfile) {
shared_ptr<Download> dl(new Download(url, outfile));
downloads_.push_back(dl);
return dl;
}