add noexcepts (#2119)
Co-authored-by: Bart Louwers <bart@emeel.net> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Bart Louwers <bart.louwers@gmail.com>
This commit is contained in:
@@ -10,7 +10,7 @@ namespace expression {
|
||||
|
||||
namespace {
|
||||
|
||||
int normalizeIndex(int index, int length) {
|
||||
int normalizeIndex(int index, int length) noexcept {
|
||||
if (index < 0) {
|
||||
index += length;
|
||||
}
|
||||
@@ -133,7 +133,7 @@ ParseResult Slice::parse(const Convertible &value, ParsingContext &ctx) {
|
||||
std::make_unique<Slice>(std::move(*input), std::move(*fromIndex), toIndex ? std::move(*toIndex) : nullptr));
|
||||
}
|
||||
|
||||
bool Slice::operator==(const Expression &e) const {
|
||||
bool Slice::operator==(const Expression &e) const noexcept {
|
||||
if (e.getKind() == Kind::Slice) {
|
||||
auto rhs = static_cast<const Slice *>(&e);
|
||||
const auto toIndexEqual = (toIndex && rhs->toIndex && *toIndex == *(rhs->toIndex)) ||
|
||||
@@ -147,10 +147,6 @@ std::vector<std::optional<Value>> Slice::possibleOutputs() const {
|
||||
return {std::nullopt};
|
||||
}
|
||||
|
||||
std::string Slice::getOperator() const {
|
||||
return "slice";
|
||||
}
|
||||
|
||||
} // namespace expression
|
||||
} // namespace style
|
||||
} // namespace mbgl
|
||||
|
||||
Reference in New Issue
Block a user