Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/inc/drogon/HttpResponse.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ using HttpResponsePtr = std::shared_ptr<HttpResponse>;
* type object. Users must specialize the template for a particular type.
*/
template <typename T>
T fromResponse(const HttpResponse &resp)
T fromResponse(const HttpResponse &)
{
LOG_ERROR
<< "You must specialize the fromResponse template for the type of "
Expand Down
4 changes: 2 additions & 2 deletions lib/inc/drogon/HttpViewData.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,9 @@ class DROGON_EXPORT HttpViewData
backup_ap);
va_end(backup_ap);
if ((result >= 0) &&
((std::string::size_type)result < strBuffer.size()))
(static_cast<std::string::size_type>(result) < strBuffer.size()))
{
strBuffer.resize(result);
strBuffer.resize(static_cast<std::string::size_type>(result));
}
else
{
Expand Down
1 change: 0 additions & 1 deletion lib/src/HttpClientImpl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -549,7 +549,6 @@ void HttpClientImpl::handleResponse(
const trantor::TcpConnectionPtr &connPtr)
{
assert(!pipeliningCallbacks_.empty());
auto &type = resp->getHeaderBy("content-type");
auto &coding = resp->getHeaderBy("content-encoding");
if (coding == "gzip")
{
Expand Down
2 changes: 1 addition & 1 deletion lib/src/HttpControllersRouter.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ namespace drogon
{
class HttpControllerBinder;
class HttpSimpleControllerBinder;
class WebsocketControllerBinder;
struct WebsocketControllerBinder;

class HttpControllersRouter : public trantor::NonCopyable
{
Expand Down
5 changes: 0 additions & 5 deletions lib/src/HttpResponseImpl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,6 @@ HttpResponsePtr HttpResponse::newFileResponse(
// Check for type and assign proper content type in header
if (!typeString.empty())
{
// auto contentType = type;
if (type == CT_NONE)
type = parseContentType(typeString);
if (type == CT_NONE)
Expand Down Expand Up @@ -344,7 +343,6 @@ HttpResponsePtr HttpResponse::newFileResponse(
if (!typeString.empty())
{
auto r = static_cast<HttpResponse *>(resp.get());
// auto contentType = type;
if (type == CT_NONE)
type = parseContentType(typeString);
if (type == CT_NONE)
Expand All @@ -368,7 +366,6 @@ HttpResponsePtr HttpResponse::newFileResponse(
else
{
auto r = static_cast<HttpResponse *>(resp.get());
// auto contentType = type;
if (type == CT_NONE)
type = parseContentType(typeString);
if (type == CT_NONE)
Expand Down Expand Up @@ -423,7 +420,6 @@ HttpResponsePtr HttpResponse::newStreamResponse(
if (!typeString.empty())
{
auto r = static_cast<HttpResponse *>(resp.get());
auto contentType = type;
if (type == CT_NONE)
type = parseContentType(typeString);
if (type == CT_NONE)
Expand All @@ -443,7 +439,6 @@ HttpResponsePtr HttpResponse::newStreamResponse(
else
{
auto r = static_cast<HttpResponse *>(resp.get());
auto contentType = type;
if (type == CT_NONE)
type = parseContentType(typeString);
if (type == CT_NONE)
Expand Down
1 change: 0 additions & 1 deletion lib/src/SlidingWindowRateLimiter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ bool SlidingWindowRateLimiter::isAllowed()
auto duration =
std::chrono::duration_cast<std::chrono::duration<double>>(
unitStartTime_ - lastTime_);
auto startTime = lastTime_;
if (duration >= timeUnit_)
{
previousRequests_ = 0;
Expand Down
3 changes: 1 addition & 2 deletions lib/src/Utilities.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1039,7 +1039,6 @@ void dateToCustomFormattedString(const std::string &fmtStr,
const trantor::Date &date)
{
auto nowSecond = date.microSecondsSinceEpoch() / MICRO_SECONDS_PRE_SEC;
time_t seconds = static_cast<time_t>(nowSecond);
struct tm tm_LValue = date.tmStruct();
std::stringstream Out;
Out.imbue(std::locale{"C"});
Expand Down Expand Up @@ -1318,7 +1317,7 @@ const size_t fixedRandomNumber = []() {
utils::secureRandomBytes(&res, sizeof(res));
return res;
}();
}
} // namespace internal

} // namespace utils
} // namespace drogon
Loading