diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-01-30 20:33:23 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-01-30 20:33:23 +0300 |
commit | 5015c59af9d28b3a3bbedfd54b3827dd96597efa (patch) | |
tree | b9535924f378ce192c5ab150a3c9738213abbc80 /src/net/download.cpp | |
parent | d4d588a10e37bcd0f8653e697952f21602b8d0e9 (diff) | |
download | ManaVerse-5015c59af9d28b3a3bbedfd54b3827dd96597efa.tar.gz ManaVerse-5015c59af9d28b3a3bbedfd54b3827dd96597efa.tar.bz2 ManaVerse-5015c59af9d28b3a3bbedfd54b3827dd96597efa.tar.xz ManaVerse-5015c59af9d28b3a3bbedfd54b3827dd96597efa.zip |
Fix code style.
Diffstat (limited to 'src/net/download.cpp')
-rw-r--r-- | src/net/download.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/net/download.cpp b/src/net/download.cpp index 2abffba0c..d0c6515fc 100644 --- a/src/net/download.cpp +++ b/src/net/download.cpp @@ -541,14 +541,12 @@ void Download::prepareForm(curl_httppost **form, const std::string &fileName) curl_httppost *lastPtr = nullptr; std::ifstream file; - std::ostringstream str; - char *line = new char[10001]; - file.open(fileName.c_str(), std::ios::in); - if (!file.is_open()) return; + char *line = new char[10001]; + std::ostringstream str; while (file.getline(line, 10000)) str << line << "\n"; @@ -560,8 +558,10 @@ void Download::prepareForm(curl_httppost **form, const std::string &fileName) CURLFORM_END); } -size_t Download::writeFunction(void *ptr, size_t size, - size_t nmemb, void *stream) +size_t Download::writeFunction(void *ptr, + size_t size, + size_t nmemb, + void *stream A_UNUSED) { const size_t totalMem = size * nmemb; char *buf = new char[totalMem + 1]; |