Skip to content

Commit

Permalink
Fix trailing whitespaces at different locations
Browse files Browse the repository at this point in the history
Signed-off-by: Sergey Smolov <[email protected]>
  • Loading branch information
ssmolov committed Aug 4, 2023
1 parent a8c1fab commit ea5235d
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 15 deletions.
4 changes: 2 additions & 2 deletions docs/parsers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ AIGER format
.. toctree::

aiger

.. doxygenclass:: lorina::aiger_reader

BENCH format
Expand Down Expand Up @@ -97,5 +97,5 @@ VERILOG format
.. toctree::

verilog

.. doxygenclass:: lorina::verilog_reader
2 changes: 1 addition & 1 deletion include/lorina/bristol.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ class bristol_parser
if ( diag )
{
diag->report( diag_id::ERR_FILE_OPEN ).add_argument( filename );
}
}
return return_code::parse_error;
}
else
Expand Down
6 changes: 3 additions & 3 deletions include/lorina/dimacs.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ static std::regex clause( R"(((-?[1-9][0-9]*)+ +)+0)" );
return true;
}

if ( found_spec == false )
if ( found_spec == false )
{
if ( diag )
{
Expand All @@ -159,7 +159,7 @@ static std::regex clause( R"(((-?[1-9][0-9]*)+ +)+0)" );
return false;
}

for ( std::sregex_iterator i = clauses_begin; i != clauses_end; ++i )
for ( std::sregex_iterator i = clauses_begin; i != clauses_end; ++i )
{
std::smatch match = *i;
std::stringstream ss( match[0].str() );
Expand All @@ -174,7 +174,7 @@ static std::regex clause( R"(((-?[1-9][0-9]*)+ +)+0)" );
}
}
reader.on_clause( clause );
}
}
return true;
} );

Expand Down
6 changes: 3 additions & 3 deletions lib/infint/InfInt/InfInt.h
Original file line number Diff line number Diff line change
Expand Up @@ -1206,7 +1206,7 @@ inline bool InfInt::equalizeSigns()
}
}
}

return isPositive;
}

Expand All @@ -1232,7 +1232,7 @@ inline void InfInt::correct(bool justCheckLeadingZeros, bool hasValidSign)
if (!justCheckLeadingZeros)
{
truncateToBase();

if (equalizeSigns())
{
pos = ((val.size() == 1 && val[0] == 0) || !hasValidSign) ? true : pos;
Expand All @@ -1246,7 +1246,7 @@ inline void InfInt::correct(bool justCheckLeadingZeros, bool hasValidSign)
}
}
}

removeLeadingZeros();
}

Expand Down
6 changes: 3 additions & 3 deletions test/dimacs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,15 +131,15 @@ TEST_CASE( "cnf_dimacs variables ending with 0", "[dimacs]" )
"p cnf 10 2\n"
"1 -10 8 0\n"
"-2 3 10 0\n";

std::istringstream iss( dimacs );

dimacs_statistics stats;
dimacs_statistics_reader reader( stats );
diagnostic_consumer consumer;
diagnostic_engine diag( &consumer );
auto const result = read_dimacs( iss, reader, &diag );

CHECK( result == return_code::success );
CHECK( stats.format == "cnf" );
CHECK( stats.number_of_variables == 10 );
Expand Down
6 changes: 3 additions & 3 deletions test/super.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ struct test_super_reader : public super_reader
{
lib.genlib_name = genlib_name;
lib.max_num_vars = max_num_vars;
lib.num_supergates = max_supergates;
lib.num_supergates = max_supergates;
lib.num_lines = num_lines;
}

Expand All @@ -57,7 +57,7 @@ TEST_CASE( "instantiate super_reader", "[super]")
"test.genlib\n"
"3\n"
"8\n"
"14\n"
"14\n"
"* and 1 0\n"
"* and 2 3\n"
"and 2 0\n"
Expand Down Expand Up @@ -170,7 +170,7 @@ TEST_CASE( "read SUPER format", "[super]")
"test.genlib\n"
"3\n"
"2\n"
"6\n"
"6\n"
"* and2 1 0\n"
"* or2 2 1\n"
"and2 2 0\n"
Expand Down

0 comments on commit ea5235d

Please sign in to comment.