Skip to content

Commit fbf6195

Browse files
committed
Make lexer safer in clo; Remove dead declaration in clg.
1 parent f3f3c59 commit fbf6195

File tree

2 files changed

+2
-15
lines changed

2 files changed

+2
-15
lines changed

components/core/src/clp/clg/clg.cpp

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -48,19 +48,6 @@ using std::vector;
4848
* @return true on success, false otherwise
4949
*/
5050
static bool open_archive(string const& archive_path, Archive& archive_reader);
51-
/**
52-
* Searches the archive with the given parameters
53-
* @param search_strings
54-
* @param command_line_args
55-
* @param archive
56-
* @return true on success, false otherwise
57-
*/
58-
static bool search(
59-
vector<string> const& search_strings,
60-
CommandLineArguments& command_line_args,
61-
Archive& archive,
62-
bool use_heuristic
63-
);
6451
/**
6552
* Opens a compressed file or logs any errors if it couldn't be opened
6653
* @param file_metadata_ix

components/core/src/clp/clo/clo.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -476,11 +476,11 @@ static bool search_archive(
476476

477477
// Load lexers from schema file if it exists
478478
auto schema_file_path = archive_path / clp::streaming_archive::cSchemaFileName;
479-
unique_ptr<log_surgeon::lexers::ByteLexer> lexer;
479+
auto lexer{std::make_unique<log_surgeon::lexers::ByteLexer>()};
480480
bool use_heuristic = true;
481481
if (std::filesystem::exists(schema_file_path)) {
482482
use_heuristic = false;
483-
lexer.reset(new log_surgeon::lexers::ByteLexer());
483+
lexer = std::make_unique<log_surgeon::lexers::ByteLexer>();
484484
load_lexer_from_file(schema_file_path.string(), *lexer);
485485
}
486486

0 commit comments

Comments
 (0)