]> git.tdb.fi Git - libs/net.git/blobdiff - source/response.cpp
Style update: spaces around assignments
[libs/net.git] / source / response.cpp
index 4da67422fa221735ea234f64d7430e0d2e857d88..fe7469d0780d32372f392d80bacf5fbe65be434c 100644 (file)
@@ -20,8 +20,8 @@ Response::Response(Status s):
 
 string Response::str() const
 {
-       string result=format("%s %d %s\r\n", version_str(http_version), static_cast<int>(status), status);
-       result+=str_common();
+       string result = format("%s %d %s\r\n", version_str(http_version), static_cast<int>(status), status);
+       result += str_common();
 
        return result;
 }
@@ -30,15 +30,15 @@ Response Response::parse(const string &str)
 {
        Response result;
 
-       unsigned lf=str.find('\n');
-       vector<string> parts=split(str.substr(0, lf), ' ', 2);
+       unsigned lf = str.find('\n');
+       vector<string> parts = split(str.substr(0, lf), ' ', 2);
        if(parts.size()<2)
                throw InvalidParameterValue("Invalid response");
 
-       result.http_version=parse_version(parts[0]);
-       result.status=static_cast<Status>(lexical_cast<unsigned>(parts[1]));
+       result.http_version = parse_version(parts[0]);
+       result.status = static_cast<Status>(lexical_cast<unsigned>(parts[1]));
 
-       lf+=result.parse_headers(str.substr(lf+1));
+       lf += result.parse_headers(str.substr(lf+1));
 
        result.parse_content(str.substr(lf+1));