Skip to content

Commit

Permalink
fixed the formatting using clang-format
Browse files Browse the repository at this point in the history
  • Loading branch information
SgtApone117 committed Dec 2, 2024
1 parent 7b0bdb3 commit ca5f849
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 20 deletions.
3 changes: 2 additions & 1 deletion include/faker-cxx/science.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
#pragma once

#include <string_view>
#include "faker-cxx/types/locale.h"

#include "faker-cxx/export.h"
#include "faker-cxx/types/locale.h"

namespace faker::science
{
Expand Down
19 changes: 10 additions & 9 deletions src/modules/science.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,18 @@

namespace faker::science
{
namespace
namespace
{
const struct ScienceDefinition& getScienceDefinition(Locale locale)
{
switch (locale)
{
const struct ScienceDefinition& getScienceDefinition(Locale locale)
{
switch (locale)
{
default:
return enUSscienceDefinition;
}
}
default:
return enUSscienceDefinition;
}
}
}

ChemicalElement chemicalElement(Locale locale)
{
const auto& scienceDefinition = getScienceDefinition(locale);
Expand Down
21 changes: 11 additions & 10 deletions src/modules/science_data.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,21 @@

#include <array>
#include <span>

#include "faker-cxx/science.h"

namespace faker::science
{
struct ScienceDefinition
{
std::span<const ChemicalElement> chemicalElements;
std::span<const Unit> distanceUnits;
std::span<const Unit> massUnits;
std::span<const Unit> timeUnits;
std::span<const Unit> currentUnits;
std::span<const Unit> temperatureUnits;
};
struct ScienceDefinition
{
std::span<const ChemicalElement> chemicalElements;
std::span<const Unit> distanceUnits;
std::span<const Unit> massUnits;
std::span<const Unit> timeUnits;
std::span<const Unit> currentUnits;
std::span<const Unit> temperatureUnits;
};

const auto enUSchemicalElements = std::to_array<ChemicalElement>(
{{"Hydrogen", "H", 1}, {"Helium", "He", 2}, {"Lithium", "Li", 3}, {"Beryllium", "Be", 4},
{"Boron", "B", 5}, {"Carbon", "C", 6}, {"Nitrogen", "N", 7}, {"Oxygen", "O", 8},
Expand Down

0 comments on commit ca5f849

Please sign in to comment.