mirror of
https://gitee.com/an-tao/drogon.git
synced 2024-12-02 03:38:03 +08:00
Format some files for good code style (#196)
This commit is contained in:
parent
007fee1043
commit
33577b9666
@ -21,7 +21,8 @@ void help::handleCommand(std::vector<std::string> ¶meters)
|
|||||||
{
|
{
|
||||||
if (parameters.size() == 0)
|
if (parameters.size() == 0)
|
||||||
{
|
{
|
||||||
std::cout << "usage: drogon_ctl [-v | --version] [-h | --help] <command> [<args>]"
|
std::cout << "usage: drogon_ctl [-v | --version] [-h | --help] "
|
||||||
|
"<command> [<args>]"
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
std::cout << "commands list:" << std::endl;
|
std::cout << "commands list:" << std::endl;
|
||||||
for (auto &className : drogon::DrClassMap::getAllClassName())
|
for (auto &className : drogon::DrClassMap::getAllClassName())
|
||||||
|
@ -70,6 +70,5 @@ class press : public DrObject<press>, public CommandHandler
|
|||||||
std::unique_ptr<trantor::EventLoopThreadPool> _loopPool;
|
std::unique_ptr<trantor::EventLoopThreadPool> _loopPool;
|
||||||
std::vector<HttpClientPtr> _clients;
|
std::vector<HttpClientPtr> _clients;
|
||||||
Statistics _stat;
|
Statistics _stat;
|
||||||
|
|
||||||
};
|
};
|
||||||
} // namespace drogon_ctl
|
} // namespace drogon_ctl
|
||||||
|
@ -64,7 +64,8 @@ char *CacheFile::data()
|
|||||||
fflush(_file);
|
fflush(_file);
|
||||||
auto fd = fileno(_file);
|
auto fd = fileno(_file);
|
||||||
_dataLength = length();
|
_dataLength = length();
|
||||||
_data = static_cast<char *>(mmap(nullptr, _dataLength, PROT_READ, MAP_SHARED, fd, 0));
|
_data = static_cast<char *>(
|
||||||
|
mmap(nullptr, _dataLength, PROT_READ, MAP_SHARED, fd, 0));
|
||||||
if (_data == MAP_FAILED)
|
if (_data == MAP_FAILED)
|
||||||
{
|
{
|
||||||
_data = nullptr;
|
_data = nullptr;
|
||||||
|
@ -202,7 +202,7 @@ void HttpAppFrameworkImpl::setSSLFiles(const std::string &certPath,
|
|||||||
void HttpAppFrameworkImpl::run()
|
void HttpAppFrameworkImpl::run()
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
LOG_INFO << "Start to run...";
|
LOG_TRACE << "Start to run...";
|
||||||
trantor::AsyncFileLogger asyncFileLogger;
|
trantor::AsyncFileLogger asyncFileLogger;
|
||||||
// Create dirs for cache files
|
// Create dirs for cache files
|
||||||
for (int i = 0; i < 256; i++)
|
for (int i = 0; i < 256; i++)
|
||||||
|
@ -64,7 +64,8 @@ class ListenerManager : public trantor::NonCopyable
|
|||||||
};
|
};
|
||||||
std::vector<ListenerInfo> _listeners;
|
std::vector<ListenerInfo> _listeners;
|
||||||
std::vector<std::shared_ptr<HttpServer>> _servers;
|
std::vector<std::shared_ptr<HttpServer>> _servers;
|
||||||
std::vector<std::shared_ptr<trantor::EventLoopThread>> _listeningloopThreads;
|
std::vector<std::shared_ptr<trantor::EventLoopThread>>
|
||||||
|
_listeningloopThreads;
|
||||||
std::string _sslCertPath;
|
std::string _sslCertPath;
|
||||||
std::string _sslKeyPath;
|
std::string _sslKeyPath;
|
||||||
std::shared_ptr<trantor::EventLoopThreadPool> _ioLoopThreadPoolPtr;
|
std::shared_ptr<trantor::EventLoopThreadPool> _ioLoopThreadPoolPtr;
|
||||||
|
Loading…
Reference in New Issue
Block a user