Format #933

As always, I fogot about something
parent deb294e6
...@@ -52,7 +52,7 @@ namespace Pistache::Async ...@@ -52,7 +52,7 @@ namespace Pistache::Async
{ {
public: public:
const char* what() const noexcept override { return "Bad any cast"; } const char* what() const noexcept override { return "Bad any cast"; }
~BadAnyCast() override = default; ~BadAnyCast() override = default;
}; };
enum class State { Pending, enum class State { Pending,
...@@ -65,7 +65,7 @@ namespace Pistache::Async ...@@ -65,7 +65,7 @@ namespace Pistache::Async
class PromiseBase class PromiseBase
{ {
public: public:
virtual ~PromiseBase() = default; virtual ~PromiseBase() = default;
virtual bool isPending() const = 0; virtual bool isPending() const = 0;
virtual bool isFulfilled() const = 0; virtual bool isFulfilled() const = 0;
virtual bool isRejected() const = 0; virtual bool isRejected() const = 0;
...@@ -192,7 +192,7 @@ namespace Pistache::Async ...@@ -192,7 +192,7 @@ namespace Pistache::Async
public: public:
virtual void resolve(const std::shared_ptr<Core>& core) = 0; virtual void resolve(const std::shared_ptr<Core>& core) = 0;
virtual void reject(const std::shared_ptr<Core>& core) = 0; virtual void reject(const std::shared_ptr<Core>& core) = 0;
virtual ~Request() = default; virtual ~Request() = default;
}; };
struct Core struct Core
......
...@@ -69,7 +69,7 @@ namespace Pistache::Http::Header ...@@ -69,7 +69,7 @@ namespace Pistache::Http::Header
class Header class Header
{ {
public: public:
virtual ~Header() = default; virtual ~Header() = default;
virtual const char* name() const = 0; virtual const char* name() const = 0;
virtual void parse(const std::string& data); virtual void parse(const std::string& data);
......
...@@ -17,7 +17,7 @@ namespace Pistache ...@@ -17,7 +17,7 @@ namespace Pistache
struct Prototype struct Prototype
{ {
public: public:
virtual ~Prototype() = default; virtual ~Prototype() = default;
virtual std::shared_ptr<Class> clone() const = 0; virtual std::shared_ptr<Class> clone() const = 0;
}; };
......
...@@ -142,7 +142,7 @@ namespace Pistache::Aio ...@@ -142,7 +142,7 @@ namespace Pistache::Aio
class ExecutionContext class ExecutionContext
{ {
public: public:
virtual ~ExecutionContext() = default; virtual ~ExecutionContext() = default;
virtual Reactor::Impl* makeImpl(Reactor* reactor) const = 0; virtual Reactor::Impl* makeImpl(Reactor* reactor) const = 0;
}; };
......
...@@ -109,10 +109,10 @@ namespace Pistache ...@@ -109,10 +109,10 @@ namespace Pistache
{ {
using Http::crlf; using Http::crlf;
const auto& res = request.resource(); const auto& res = request.resource();
const auto [host, path] = splitUrl(res); const auto [host, path] = splitUrl(res);
const auto& body = request.body(); const auto& body = request.body();
const auto& query = request.query(); const auto& query = request.query();
auto pathStr = std::string(path); auto pathStr = std::string(path);
...@@ -848,7 +848,7 @@ namespace Pistache ...@@ -848,7 +848,7 @@ namespace Pistache
[](const std::shared_ptr<Connection>& conn) { return conn->isIdle(); }); [](const std::shared_ptr<Connection>& conn) { return conn->isIdle(); });
} }
size_t ConnectionPool::availableConnections(const std::string& /*domain*/) const size_t ConnectionPool::availableConnections(const std::string& /*domain*/) const
{ {
return 0; return 0;
} }
......
...@@ -568,7 +568,7 @@ namespace Pistache::Http::Header ...@@ -568,7 +568,7 @@ namespace Pistache::Http::Header
} while (!cursor.eof()); } while (!cursor.eof());
} }
void Accept::write(std::ostream& /*os*/) const {} void Accept::write(std::ostream& /*os*/) const { }
void AccessControlAllowOrigin::parse(const std::string& data) { uri_ = data; } void AccessControlAllowOrigin::parse(const std::string& data) { uri_ = data; }
......
...@@ -473,7 +473,7 @@ namespace Pistache::Aio ...@@ -473,7 +473,7 @@ namespace Pistache::Aio
template <typename Func, typename... Args> template <typename Func, typename... Args>
void dispatchCall(const Reactor::Key& key, Func func, Args&&... args) const void dispatchCall(const Reactor::Key& key, Func func, Args&&... args) const
{ {
auto decoded = decodeKey(key); auto decoded = decodeKey(key);
const auto& wrk = workers_.at(decoded.second); const auto& wrk = workers_.at(decoded.second);
Reactor::Key originalKey(decoded.first); Reactor::Key originalKey(decoded.first);
......
...@@ -268,9 +268,9 @@ namespace Pistache::Tcp ...@@ -268,9 +268,9 @@ namespace Pistache::Tcp
if (buffer.isRaw()) if (buffer.isRaw())
{ {
auto raw = buffer.raw(); auto raw = buffer.raw();
const auto* ptr = raw.data().c_str() + totalWritten; const auto* ptr = raw.data().c_str() + totalWritten;
bytesWritten = sendRawBuffer(fd, ptr, len, flags); bytesWritten = sendRawBuffer(fd, ptr, len, flags);
} }
else else
{ {
......
...@@ -312,7 +312,7 @@ namespace Pistache::Tcp ...@@ -312,7 +312,7 @@ namespace Pistache::Tcp
struct sockaddr_in sock_addr = { 0 }; struct sockaddr_in sock_addr = { 0 };
socklen_t addrlen = sizeof(sock_addr); socklen_t addrlen = sizeof(sock_addr);
auto* sock_addr_alias = reinterpret_cast<struct sockaddr*>(&sock_addr); auto* sock_addr_alias = reinterpret_cast<struct sockaddr*>(&sock_addr);
if (-1 == getsockname(listen_fd, sock_addr_alias, &addrlen)) if (-1 == getsockname(listen_fd, sock_addr_alias, &addrlen))
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment