Only initialize search::options once.
This commit is contained in:
parent
af58d6e35a
commit
ce015954ea
12
src/main.cpp
12
src/main.cpp
|
@ -75,12 +75,6 @@ int main(int argc, char *argv[])
|
|||
// TODO: Read data from stdin.
|
||||
}
|
||||
else
|
||||
{
|
||||
for (const auto &filepath :
|
||||
vm["input-file"].as<std::vector<std::string>>())
|
||||
{
|
||||
for (const auto ®ex :
|
||||
vm["regexp"].as<std::vector<std::string>>())
|
||||
{
|
||||
search::options opts;
|
||||
if (vm.count("basic-regexp") > 0)
|
||||
|
@ -109,6 +103,12 @@ int main(int argc, char *argv[])
|
|||
}
|
||||
opts.context = vm["context"].as<std::uint64_t>();
|
||||
|
||||
for (const auto &filepath :
|
||||
vm["input-file"].as<std::vector<std::string>>())
|
||||
{
|
||||
for (const auto ®ex :
|
||||
vm["regexp"].as<std::vector<std::string>>())
|
||||
{
|
||||
try
|
||||
{
|
||||
for (const auto &match :
|
||||
|
|
Loading…
Reference in New Issue
Block a user