mirror of
https://gitee.com/an-tao/drogon.git
synced 2024-11-30 02:37:57 +08:00
Fix a bug for jsoncpp1.7 version
This commit is contained in:
parent
c62f681b2c
commit
d20caa2dbb
@ -85,7 +85,7 @@ static void loadApp(const Json::Value &app)
|
||||
}
|
||||
//file types
|
||||
auto fileTypes=app["file_types"];
|
||||
if(fileTypes&&fileTypes.isArray()&&!fileTypes.empty())
|
||||
if(fileTypes.isArray()&&!fileTypes.empty())
|
||||
{
|
||||
std::vector<std::string> types;
|
||||
for(auto fileType:fileTypes)
|
||||
@ -106,7 +106,7 @@ static void loadApp(const Json::Value &app)
|
||||
if(enableDynamicViews)
|
||||
{
|
||||
auto viewsPaths=app["dynamic_views_path"];
|
||||
if(viewsPaths&&viewsPaths.isArray()&&viewsPaths.size()>0)
|
||||
if(viewsPaths.isArray()&&viewsPaths.size()>0)
|
||||
{
|
||||
std::vector<std::string> paths;
|
||||
for(auto viewsPath:viewsPaths)
|
||||
@ -161,4 +161,4 @@ void ConfigLoader::load() {
|
||||
loadApp(_configJsonRoot["app"]);
|
||||
loadSSL(_configJsonRoot["ssl"]);
|
||||
loadListeners(_configJsonRoot["listeners"]);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user