mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-07-01 23:57:37 +08:00
修正判断Json::Value::find函数返回值 (#4347)
修正Json::Value::find函数返回值并非iterator而是Value指针
This commit is contained in:
@@ -89,11 +89,11 @@ std::string getValue(Args &args, const Key &key) {
|
||||
|
||||
template<typename Key>
|
||||
std::string getValue(Json::Value &args, const Key &key) {
|
||||
auto it = args.find(key);
|
||||
if (it == args.end()) {
|
||||
auto value = args.find(key);
|
||||
if (value == nullptr) {
|
||||
return "";
|
||||
}
|
||||
return it->second.asString();
|
||||
return value->asString();
|
||||
}
|
||||
|
||||
template<typename Key>
|
||||
|
||||
Reference in New Issue
Block a user