Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed May 4, 2024
1 parent bb6ef6a commit e93eb00
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
4 changes: 2 additions & 2 deletions test/test_unit_strings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -525,8 +525,8 @@ TEST(stringToUnits, toDefaultUnit)

TEST(stringToUnits, measurementTypes)
{
EXPECT_EQ(pu*m.pow(2), unit_from_string("pu*area"));
EXPECT_EQ(percent*m.pow(2), unit_from_string("percent*Area"));
EXPECT_EQ(pu * m.pow(2), unit_from_string("pu*area"));
EXPECT_EQ(percent * m.pow(2), unit_from_string("percent*Area"));
}

TEST(stringToUnits, Power)
Expand Down
6 changes: 2 additions & 4 deletions units/units.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5830,11 +5830,9 @@ static precise_unit unit_from_string_internal(
} else {
sloc = ustring.find_first_of(
getMatchCharacter(ustring[sloc]), sloc);
if (sloc != std::string::npos)
{
ustring.insert(sloc + 1,1,'}');
if (sloc != std::string::npos) {
ustring.insert(sloc + 1, 1, '}');
}

}

auto cunit =
Expand Down

0 comments on commit e93eb00

Please sign in to comment.