Commit 9ff8066d by Antonio Maiorano

Fix FunctionT not forwarding its varargs

The "name" paramter for a Routine supports format strings with varargs, but FunctionT did not correctly forward the args. Bug: b/174358505 Change-Id: Ib94f8b8b4f8a4424e8aa0db0a4e4f8a286f3de2e Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/50788 Kokoro-Result: kokoro <noreply+kokoro@google.com> Reviewed-by: 's avatarNicolas Capens <nicolascapens@google.com> Tested-by: 's avatarAntonio Maiorano <amaiorano@google.com>
parent bfb21191
......@@ -2639,14 +2639,16 @@ public:
// Hide base implementations of operator()
RoutineType operator()(const char *name, ...)
template<typename... VarArgs>
RoutineType operator()(const char *name, VarArgs... varArgs)
{
return RoutineType(BaseType::operator()(name));
return RoutineType(BaseType::operator()(name, std::forward<VarArgs>(varArgs)...));
}
RoutineType operator()(const Config::Edit &cfg, const char *name, ...)
template<typename... VarArgs>
RoutineType operator()(const Config::Edit &cfg, const char *name, VarArgs... varArgs)
{
return RoutineType(BaseType::operator()(cfg, name));
return RoutineType(BaseType::operator()(cfg, name, std::forward<VarArgs>(varArgs)...));
}
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment