Skip to content

Commit

Permalink
clang format files for Lint Code Base CI
Browse files Browse the repository at this point in the history
  • Loading branch information
AngeDieu committed Nov 3, 2023
1 parent 7d84e51 commit 2c85ad8
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 10 deletions.
4 changes: 2 additions & 2 deletions apps/math_toolbox.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -196,11 +196,11 @@ constexpr const ToolboxMessageTree
*const unitVolumeChildrenForImperialToolbox[] = {
&unitVolumeTeaspoon, &unitVolumeTablespoon, &unitVolumeFluidOunce,
&unitVolumeCup, &unitVolumePint, &unitVolumeQuart,
&unitVolumeGallonUs, &unitVolumeGallonUk, &unitVolumeLiterNode};
&unitVolumeGallonUs, &unitVolumeGallonUk, &unitVolumeLiterNode};
constexpr const ToolboxMessageTree *const unitVolumeImperialChildren[] = {
&unitVolumeTeaspoon, &unitVolumeTablespoon, &unitVolumeFluidOunce,
&unitVolumeCup, &unitVolumePint, &unitVolumeQuart,
&unitVolumeGallonUs, &unitVolumeGallonUk};
&unitVolumeGallonUs, &unitVolumeGallonUk};
constexpr ToolboxMessageTree unitVolumeImperialNode = ToolboxMessageTree::Node(
I18n::Message::UnitImperialMenu, unitVolumeImperialChildren);
constexpr const ToolboxMessageTree *const unitVolumeChildrenForMetricToolbox[] =
Expand Down
12 changes: 10 additions & 2 deletions poincare/include/poincare/unit.h
Original file line number Diff line number Diff line change
Expand Up @@ -1455,9 +1455,17 @@ class Unit : public Expression {
"qt"),
"Index for the Quart Representative is incorrect.");
static constexpr int k_gallonUsRepresentativeIndex = 7;
static_assert(Helpers::StringsAreEqual(k_volumeRepresentatives[k_gallonUsRepresentativeIndex].m_rootSymbols, "galUS"), "Index for the Gallon(US) Representative is incorrect.");
static_assert(
Helpers::StringsAreEqual(
k_volumeRepresentatives[k_gallonUsRepresentativeIndex].m_rootSymbols,
"galUS"),
"Index for the Gallon(US) Representative is incorrect.");
static constexpr int k_gallonUkRepresentativeIndex = 8;
static_assert(Helpers::StringsAreEqual(k_volumeRepresentatives[k_gallonUkRepresentativeIndex].m_rootSymbols, "galUK"), "Index for the Gallon(UK) Representative is incorrect.");
static_assert(
Helpers::StringsAreEqual(
k_volumeRepresentatives[k_gallonUkRepresentativeIndex].m_rootSymbols,
"galUK"),
"Index for the Gallon(UK) Representative is incorrect.");

Unit(const UnitNode* node) : Expression(node) {}
static Unit Builder(const Representative* representative,
Expand Down
12 changes: 6 additions & 6 deletions poincare/src/unit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -991,12 +991,12 @@ int UnitNode::VolumeRepresentative::setAdditionalExpressions(
Unit::Builder(
representativesOfSameDimension() + Unit::k_quartRepresentativeIndex,
Prefix::EmptyPrefix()),
Unit::Builder(
representativesOfSameDimension() + Unit::k_gallonUsRepresentativeIndex,
Prefix::EmptyPrefix()),
Unit::Builder(
representativesOfSameDimension() + Unit::k_gallonUkRepresentativeIndex,
Prefix::EmptyPrefix()),
Unit::Builder(representativesOfSameDimension() +
Unit::k_gallonUsRepresentativeIndex,
Prefix::EmptyPrefix()),
Unit::Builder(representativesOfSameDimension() +
Unit::k_gallonUkRepresentativeIndex,
Prefix::EmptyPrefix()),
};
*destImperial = Unit::BuildSplit(value, splitUnits, std::size(splitUnits),
reductionContext);
Expand Down

0 comments on commit 2c85ad8

Please sign in to comment.