Skip to content

Commit

Permalink
C++20 fix (format -> stringprintf)
Browse files Browse the repository at this point in the history
  • Loading branch information
snej committed Aug 26, 2024
1 parent 5942ee6 commit 00743f0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion REST/Listener.cc
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ namespace litecore::REST {
error::_throw(error::InvalidParameter, "Invalid name for sharing a database");
}
lock_guard<mutex> lock(_mutex);
if ( _databases.find(*name) != _databases.end() ) return false;
if ( _databases.contains(*name) ) return false;
_databases.emplace(*name, db);
return true;
}
Expand Down
2 changes: 1 addition & 1 deletion REST/RESTListener+Handlers.cc
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ namespace litecore::REST {
if ( !doc ) return rq.respondWithStatus(HTTPStatus::NotFound);

// Use the revID as the HTTP ETag for conditional GETs:
string eTag = format("\"%s\"", revID.c_str());
string eTag = stringprintf("\"%s\"", revID.c_str());
if ( slice inm = rq.header("If-None-Match"); inm == eTag ) {
return rq.respondWithStatus(HTTPStatus::NotModified);
}
Expand Down

0 comments on commit 00743f0

Please sign in to comment.