Skip to content

Commit

Permalink
Fix compiler errors in previous commit
Browse files Browse the repository at this point in the history
  • Loading branch information
SharafMohamed committed Sep 25, 2024
1 parent 29e0777 commit cde19a6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/log_surgeon/finite_automata/RegexAST.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -482,11 +482,11 @@ class RegexASTCat : public RegexAST<NFAStateType> {
[[nodiscard]] auto serialize() const -> std::string override;

[[nodiscard]] auto get_left() const -> RegexAST<NFAStateType> const* {
return m_left;
return m_left.get();
}

[[nodiscard]] auto get_right() const -> RegexAST<NFAStateType> const* {
return m_right;
return m_right.get();
}

private:
Expand Down
4 changes: 2 additions & 2 deletions tests/test-lexer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,12 @@ TEST_CASE("Test the Schema class", "[Schema]") {
REQUIRE(nullptr != regex_ast_cat_ptr->get_right());

auto* regex_ast_literal
= dynamic_cast<RegexASTLiteralByte*>(regex_ast_cat_ptr->get_left().get());
= dynamic_cast<RegexASTLiteralByte const*>(regex_ast_cat_ptr->get_left());
REQUIRE(nullptr != regex_ast_literal);
REQUIRE('u' == regex_ast_literal->get_character());

auto* regex_ast_capture
= dynamic_cast<RegexASTCaptureByte*>(regex_ast_cat_ptr->get_right().get());
= dynamic_cast<RegexASTCaptureByte const*>(regex_ast_cat_ptr->get_right());
REQUIRE(nullptr != regex_ast_capture);
REQUIRE("uID" == regex_ast_capture->get_group_name());

Expand Down

0 comments on commit cde19a6

Please sign in to comment.