Remove C++14 workaround code.
We no longer support compiling in C++14, so we don't need these workarounds anymore. Change-Id: Idec5a90e98c242928182f4b32dd47459be8ca47f Reviewed-on: https://skia-review.googlesource.com/c/skia/+/541075 Reviewed-by: Arman Uguray <armansito@google.com> Auto-Submit: John Stiles <johnstiles@google.com> Commit-Queue: Arman Uguray <armansito@google.com>
This commit is contained in:
parent
4b354dfb5b
commit
91e4c7847e
@ -28,13 +28,7 @@ public:
|
||||
template<class... Statements>
|
||||
DSLBlock(Statements... statements) {
|
||||
fStatements.reserve_back(sizeof...(statements));
|
||||
// in C++17, we could just do:
|
||||
// (fStatements.push_back(DSLStatement(statements.release()).release()), ...);
|
||||
int unused[] =
|
||||
{0,
|
||||
(static_cast<void>(fStatements.push_back(DSLStatement(statements.release()).release())),
|
||||
0)...};
|
||||
static_cast<void>(unused);
|
||||
((void)fStatements.push_back(DSLStatement(statements.release()).release()), ...);
|
||||
}
|
||||
|
||||
DSLBlock(DSLBlock&& other) = default;
|
||||
|
@ -27,13 +27,7 @@ public:
|
||||
DSLCase(DSLExpression value, Statements... statements)
|
||||
: fValue(std::move(value)) {
|
||||
fStatements.reserve_back(sizeof...(statements));
|
||||
// in C++17, we could just do:
|
||||
// (fStatements.push_back(DSLStatement(std::move(statements)).release()), ...);
|
||||
int unused[] =
|
||||
{0,
|
||||
(static_cast<void>(fStatements.push_back(DSLStatement(std::move(statements)).release())),
|
||||
0)...};
|
||||
static_cast<void>(unused);
|
||||
((void)fStatements.push_back(DSLStatement(std::move(statements)).release()), ...);
|
||||
}
|
||||
|
||||
DSLCase(DSLExpression value, SkTArray<DSLStatement> statements,
|
||||
|
@ -40,11 +40,8 @@ public:
|
||||
Parameters&... parameters) {
|
||||
SkTArray<DSLParameter*> parameterArray;
|
||||
parameterArray.reserve_back(sizeof...(parameters));
|
||||
(parameterArray.push_back(¶meters), ...);
|
||||
|
||||
// in C++17, we could just do:
|
||||
// (parameterArray.push_back(¶meters), ...);
|
||||
int unused[] = {0, (static_cast<void>(parameterArray.push_back(¶meters)), 0)...};
|
||||
static_cast<void>(unused);
|
||||
// We can't have a default parameter and a template parameter pack at the same time, so
|
||||
// unfortunately we can't capture position from this overload.
|
||||
this->init(modifiers, returnType, name, std::move(parameterArray), Position());
|
||||
|
@ -142,11 +142,7 @@ public:
|
||||
static DSLPossibleExpression Call(const char* name, Args... args) {
|
||||
SkSL::ExpressionArray argArray;
|
||||
argArray.reserve_back(sizeof...(args));
|
||||
|
||||
// in C++17, we could just do:
|
||||
// (argArray.push_back(args.release()), ...);
|
||||
int unused[] = {0, (static_cast<void>(argArray.push_back(args.release())), 0)...};
|
||||
static_cast<void>(unused);
|
||||
((void)argArray.push_back(args.release()), ...);
|
||||
|
||||
return SkSL::FunctionCall::Convert(ThreadContext::Context(), Position(),
|
||||
ThreadContext::Compiler().convertIdentifier(Position(), name),
|
||||
|
Loading…
Reference in New Issue
Block a user