forked from mirrors/0ad
Avoid maybe uninitialized warning with gcc
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
This commit is contained in:
@@ -132,7 +132,7 @@ template<typename T> inline bool FromJSVal_vector(const ScriptRequest& rq, JS::H
|
||||
JS::RootedValue el(rq.cx);
|
||||
if (!JS_GetElement(rq.cx, obj, i, &el))
|
||||
FAIL("Failed to read array element");
|
||||
T el2;
|
||||
T el2{};
|
||||
if (!Script::FromJSVal<T>(rq, el, el2))
|
||||
return false;
|
||||
out.push_back(el2);
|
||||
|
||||
Reference in New Issue
Block a user