summaryrefslogtreecommitdiff
path: root/src/mbgl/storage/response.cpp
blob: 22263d2ebb64e209b64839ed375d758b9d0dc05e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#include <mbgl/storage/response.hpp>
#include <mbgl/util/chrono.hpp>

namespace mbgl {

Response::Response(const Response& res) {
    *this = res;
}

Response& Response::operator=(const Response& res) {
    error = res.error ? std::make_unique<Error>(*res.error) : nullptr;
    notModified = res.notModified;
    data = res.data;
    modified = res.modified;
    expires = res.expires;
    etag = res.etag;
    return *this;
}

Response::Error::Error(Reason reason_, const std::string& message_)
    : reason(reason_), message(message_) {
}

} // namespace mbgl