Skip to content

Commit a7ef4a4

Browse files
committed
Further formattings
1 parent 160cad2 commit a7ef4a4

12 files changed

Lines changed: 51 additions & 49 deletions

File tree

libraries/application/src/morpheus/application/application.hpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ namespace morpheus::application
1515
///
1616
///
1717
// template<typename T>
18-
class Application {
18+
class Application
19+
{
1920
public:
2021
///
2122
/// \param[in] argc The number of command line arguments.
@@ -34,7 +35,7 @@ class Application {
3435
}
3536

3637
private:
37-
po::Config mConfig; /// Common application configuration
38+
po::Config mConfig; /// Common application configuration
3839
std::filesystem::path mLogPath; /// Path to application log file.
3940
};
4041

libraries/application/src/morpheus/application/po/adapters/boost/asio.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
#include <boost/algorithm/string.hpp>
77
#include <boost/any.hpp>
88
#include <boost/asio/ip/tcp.hpp>
9-
#include <boost/system/error_code.hpp>
109
#include <boost/program_options.hpp>
10+
#include <boost/system/error_code.hpp>
1111

1212
#include <string>
1313
#include <vector>

libraries/application/src/morpheus/application/po/adapters/boost/log.hpp

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
11
#pragma once
22

33
// IWYU pragma: always_keep
4-
#include <boost/any.hpp>
54
#include <boost/algorithm/string.hpp>
5+
#include <boost/any.hpp>
66
#include <boost/log/trivial.hpp>
77
#include <boost/program_options.hpp>
88

99
#include <string>
1010
#include <vector>
1111

12-
13-
namespace boost {
12+
namespace boost
13+
{
1414

1515
BOOST_LOG_OPEN_NAMESPACE
1616

17-
namespace trivial {
17+
namespace trivial
18+
{
1819

1920
template <class CharType>
2021
void validate(boost::any& v, std::vector<std::basic_string<CharType>> const& values, severity_level*, int)
@@ -40,8 +41,8 @@ void validate(boost::any& v, std::vector<std::basic_string<CharType>> const& val
4041
throw po::validation_error(po::validation_error::invalid_option_value);
4142
}
4243

43-
}
44+
} // namespace trivial
4445

4546
BOOST_LOG_CLOSE_NAMESPACE
4647

47-
} // namespace boost::log::trivial
48+
} // namespace boost

libraries/application/src/morpheus/application/po/adapters/scannable.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ namespace boost
1414
{
1515

1616
template <class CharType, typename S>
17-
requires morpheus::meta::concepts::Scannable<S, CharType>
17+
requires morpheus::meta::concepts::Scannable<S, CharType>
1818
void validate(boost::any& v, std::vector<std::basic_string<CharType>> const& values, S*, int)
1919
{
2020
namespace po = boost::program_options;

libraries/application/src/morpheus/application/po/options.hpp

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
#pragma GCC diagnostic pop
1919
#endif // (MORPHEUS_COMPILER == MORPHEUS_GNUC_COMPILER)
2020

21-
#include <iostream>
2221
#include <filesystem>
22+
#include <iostream>
2323
#include <optional>
2424
#include <span>
2525

@@ -38,17 +38,17 @@ concept CustomProgramOptions = requires(T& t, boost::program_options::options_de
3838
/// Holds common help documentation information for applications.
3939
struct HelpDocumentation
4040
{
41-
std::string_view name; ///< The name of the application, typically the executable name.
42-
std::string_view synopsis; ///< A brief synopsis of the application, typically a one-liner describing its purpose.
41+
std::string_view name; ///< The name of the application, typically the executable name.
42+
std::string_view synopsis; ///< A brief synopsis of the application, typically a one-liner describing its purpose.
4343
std::optional<Version> version; ///< The version of the application, if available.
4444
};
4545

4646
std::optional<int> parseProgramOptions(int argc, char const* const* argv, HelpDocumentation const& msgDetails, CustomProgramOptions auto&... options)
4747
{
48-
return parseProgramOptions(std::span<char const * const>{argv, static_cast<std::size_t>(argc)}, msgDetails, options...);
48+
return parseProgramOptions(std::span<char const* const>{argv, static_cast<std::size_t>(argc)}, msgDetails, options...);
4949
}
5050

51-
std::optional<int> parseProgramOptions(std::span<char const * const> parameters, HelpDocumentation const& msgDetails, CustomProgramOptions auto&... options)
51+
std::optional<int> parseProgramOptions(std::span<char const* const> parameters, HelpDocumentation const& msgDetails, CustomProgramOptions auto&... options)
5252
{
5353
namespace po = boost::program_options;
5454
try
@@ -94,5 +94,4 @@ std::optional<int> parseProgramOptions(std::span<char const * const> parameters,
9494
return std::nullopt;
9595
}
9696

97-
9897
} // namespace morpheus::application::po

libraries/core/src/morpheus/core/functional/overload.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,16 @@ namespace morpheus::functional
1010
/// Starting point or an overload type build of lambdas
1111
/// \note
1212
/// Following the example of https://www.modernescpp.com/index.php/visiting-a-std-variant-with-the-overload-pattern
13-
template<typename... Ts>
13+
template <typename... Ts>
1414
struct Overload : std::remove_cvref_t<Ts>...
1515
{
1616
using std::remove_cvref_t<Ts>::operator()...;
1717
};
1818

19-
template<class... Ts>
19+
template <class... Ts>
2020
Overload(Ts...) -> Overload<Ts...>;
2121

22-
template<class... Ts>
22+
template <class... Ts>
2323
auto makeVisitor(Ts&&... ts)
2424
{
2525
return Overload<Ts...>(std::forward<Ts>(ts)...);

libraries/core/src/morpheus/core/serialisation/binary_writer.hpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
#include "morpheus/core/serialisation/concepts/writer_archetype.hpp"
66
#include "morpheus/core/serialisation/exceptions.hpp"
77

8-
#include <cstdint>
98
#include <cstddef>
9+
#include <cstdint>
1010
#include <iosfwd>
1111
#include <optional>
1212
#include <span>
@@ -76,8 +76,8 @@ class BinaryWriter
7676
// https://stackoverflow.com/questions/24482028/why-is-stdstreamsize-defined-as-signed-rather-than-unsigned
7777
auto const writtenSize = static_cast<std::size_t>(mOutStream.rdbuf()->sputn(reinterpret_cast<const char*>(&value), sizeof(value)));
7878
if (writtenSize != sizeof(value))
79-
throwBinaryException(fmt_ns::format("Error writing data to stream. Attempted to write {} bytes, but only {} bytes were written.", sizeof(value),
80-
writtenSize));
79+
throwBinaryException(
80+
fmt_ns::format("Error writing data to stream. Attempted to write {} bytes, but only {} bytes were written.", sizeof(value), writtenSize));
8181
}
8282

8383
/// \copydoc morpheus::serialisation::concepts::WriterArchetype::write(std::string_view const)
@@ -100,8 +100,8 @@ class BinaryWriter
100100

101101
auto const writtenSize = static_cast<std::size_t>(mOutStream.rdbuf()->sputn(reinterpret_cast<const char*>(value.data()), value.size()));
102102
if (writtenSize != value.size())
103-
throwBinaryException(fmt_ns::format("Error writing data to stream. Attempted to write {} bytes, but only {} bytes were written.", value.size(),
104-
writtenSize));
103+
throwBinaryException(
104+
fmt_ns::format("Error writing data to stream. Attempted to write {} bytes, but only {} bytes were written.", value.size(), writtenSize));
105105
}
106106

107107
/// Write a string literal to the serialisation.

libraries/core/src/morpheus/core/serialisation/exceptions.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#pragma once
22

3-
#include "morpheus/core/base/export.hpp"
43
#include "morpheus/core/base/cold.hpp"
4+
#include "morpheus/core/base/export.hpp"
55

66
#include <stdexcept>
77
#include <string>

libraries/core/tests/conformance/scan.tests.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,4 @@ TEST_CASE("Ensure scan is supported and working", "[morpheus.conformance.scan]")
2828
}
2929
}
3030

31-
} // morpheus
31+
} // namespace morpheus

libraries/core/tests/conformance/stacktrace.tests.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,4 @@ TEST_CASE("Ensure stacktrace is supported and working", "[morpheus.conformance.s
2828
}
2929
}
3030

31-
}
31+
} // namespace morpheus

0 commit comments

Comments
 (0)