renamed SkSL's assert macros
Since SkSL needs to run outside of Skia, it was originally using its
own ASSERT macro, which mapped to SkASSERT when inside of Skia. This is
causing conflicts with one or two other ASSERT macros defined around
Skia, so to avoid that I am switching SkSL over to just use Skia's
standard naming for these macros.
Bug: skia:
Change-Id: I115435d7282da03d076c6080f7b13d1972b9eb9f
Reviewed-on: https://skia-review.googlesource.com/134322
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
diff --git a/src/sksl/lex/RegexParser.cpp b/src/sksl/lex/RegexParser.cpp
index 154df15..f4fec3f 100644
--- a/src/sksl/lex/RegexParser.cpp
+++ b/src/sksl/lex/RegexParser.cpp
@@ -12,10 +12,10 @@
RegexNode RegexParser::parse(std::string source) {
fSource = source;
fIndex = 0;
- ASSERT(fStack.size() == 0);
+ SkASSERT(fStack.size() == 0);
this->regex();
- ASSERT(fStack.size() == 1);
- ASSERT(fIndex == source.size());
+ SkASSERT(fStack.size() == 1);
+ SkASSERT(fIndex == source.size());
return this->pop();
}
@@ -119,9 +119,9 @@
else {
literal();
RegexNode end = this->pop();
- ASSERT(end.fKind == RegexNode::kChar_Kind);
+ SkASSERT(end.fKind == RegexNode::kChar_Kind);
RegexNode start = this->pop();
- ASSERT(start.fKind == RegexNode::kChar_Kind);
+ SkASSERT(start.fKind == RegexNode::kChar_Kind);
fStack.push(RegexNode(RegexNode::kRange_Kind, std::move(start), std::move(end)));
}
}
@@ -171,6 +171,6 @@
case ')':
return;
default:
- ASSERT(false);
+ SkASSERT(false);
}
}