mirror of
https://gitee.com/xia-chu/ZLMediaKit.git
synced 2026-05-07 19:37:52 +08:00
修正判断Json::Value::find函数返回值 (#4347)
Some checks failed
Android / build (push) Has been cancelled
CodeQL / Analyze (cpp) (push) Has been cancelled
CodeQL / Analyze (javascript) (push) Has been cancelled
Docker / build (push) Has been cancelled
Linux / build (push) Has been cancelled
macOS / build (push) Has been cancelled
Windows / build (push) Has been cancelled
Some checks failed
Android / build (push) Has been cancelled
CodeQL / Analyze (cpp) (push) Has been cancelled
CodeQL / Analyze (javascript) (push) Has been cancelled
Docker / build (push) Has been cancelled
Linux / build (push) Has been cancelled
macOS / build (push) Has been cancelled
Windows / build (push) Has been cancelled
修正Json::Value::find函数返回值并非iterator而是Value指针
This commit is contained in:
parent
47fd8e9fc3
commit
1ead079af4
@ -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>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user