Skip to content

Commit

Permalink
Format all files
Browse files Browse the repository at this point in the history
  • Loading branch information
HenryAWE committed Jun 25, 2024
1 parent 27a01e1 commit 5f48c53
Show file tree
Hide file tree
Showing 14 changed files with 24 additions and 26 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ jobs:
matrix:
cxxstd: [20, 23]

name: MSVC C++${{matrix.cxxstd}}
name: MSVC C++${{matrix.cxxstd}}

env:
VCPKG_BUILD_TYPE: release
Expand Down Expand Up @@ -151,7 +151,7 @@ jobs:
matrix:
cxxstd: [20, 23]

name: ClangCl C++${{matrix.cxxstd}}
name: ClangCl C++${{matrix.cxxstd}}

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -192,7 +192,7 @@ jobs:
# Install newer version using PPA
- name: Install Dependencies
run: |
sudo add-apt-repository ppa:savoury1/build-tools
sudo add-apt-repository ppa:savoury1/build-tools
sudo apt-get update
sudo apt-get install -y cmake ninja-build doxygen graphviz
Expand Down
2 changes: 1 addition & 1 deletion doc/en/examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ Outputs a string with custom colors and fonts on a terminal that supports ANSI e
- In the `example/playground/` directory.
- The binary executable file is named `ipapilio`, located in the `${CMAKE_BINARY_DIR}/example/` directory.

An interactive program for testing format output. You can set your own format strings, arguments, etc. Type "help" in the program to see available commands.
An interactive program for testing format output. You can set your own format strings, arguments, etc. Type "help" in the program to see available commands.
8 changes: 4 additions & 4 deletions doc/zh-CN/script.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@
1. 参数与常量
- 参数:通过没有格式说明的替换域引用参数
- 字符串:通过单引号(`'`)包裹,并用转义序列包含特殊字符:
| 转义序列 | 结果 |
| 转义序列 | 结果 |
| ------------------------- | ------------- |
| `\'` | `'`(单引号) |
| `\'` | `'`(单引号) |
| `\\` | `\` |
| `\c``c`为任意其他字符) | `c`(不转换) |
| `\c``c`为任意其他字符) | `c`(不转换) |

- 浮点数与整数:`3.14``10`

Expand Down Expand Up @@ -57,7 +57,7 @@

语法:`{$ 条件-1: 结果-1 : $ 条件-2: 结果-2: 结果-3}`

| `条件-1` | `条件-2` | 结果 |
| `条件-1` | `条件-2` | 结果 |
| :------: | :------: | :----: |
| `true` | `true` | 结果-1 |
| `true` | `false` | 结果-1 |
Expand Down
4 changes: 2 additions & 2 deletions include/papilio/color.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ PAPILIO_EXPORT enum class color : std::uint8_t
};

/**
* @brief Terminal output style
* @brief Terminal output style
*/
PAPILIO_EXPORT enum class style : std::uint8_t
{
Expand Down Expand Up @@ -256,7 +256,7 @@ class formatter<detail::styled_arg<T>, char> : public formatter<T>

/**
* @brief Wrap a value with styling information.
*
*
* @param st Test style data
* @param val Value to output
*/
Expand Down
2 changes: 1 addition & 1 deletion include/papilio/container.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ namespace detail

/**
* @brief The base class of a `small_vector`.
*
*
* This class can be used if the user code does not need to know the size of the static capacity.
*
* @tparam T Type of the elements
Expand Down
10 changes: 5 additions & 5 deletions include/papilio/core.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ PAPILIO_EXPORT struct simple_formatter_data

/**
* @brief Convert the simple formatter data to standard formatter data.
*
*
* @return std_formatter_data The data for standard format specification.
*/
constexpr std_formatter_data to_std_data() const noexcept
Expand Down Expand Up @@ -471,9 +471,9 @@ class basic_variable : public variable_base

/**
* @brief Compares two variables.
*
*
* This function compares two variables and returns a value indicating their relationship.
*
*
* @param var Another variable to compare with.
* @return std::partial_ordering The relationship between two variables.
*/
Expand All @@ -497,9 +497,9 @@ class basic_variable : public variable_base

/**
* @brief Checks if two variables are equal.
*
*
* This function checks if two variables are equal within the specified epsilon.
*
*
* @param var Another variable to compare with.
* @param epsilon The maximum difference allowed between two variables.
* This parameter is only used when one variable holds a float value.
Expand Down
2 changes: 1 addition & 1 deletion include/papilio/locale.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ PAPILIO_EXPORT class locale_ref
*
* If the reference is empty, `std::locale::classic()` will be returned.
*
* @return std::locale The locale object.
* @return std::locale The locale object.
*/
[[nodiscard]]
std::locale get() const;
Expand Down
2 changes: 1 addition & 1 deletion include/papilio/macros.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
*/
#define PAPILIO_ASSERT(expr) assert(expr)

/**
/**
* Use this macro to avoid errors caused by ADL,
* especially when mixing this library and the standard <format>.
*/
Expand Down
4 changes: 2 additions & 2 deletions include/papilio/memory.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -143,9 +143,9 @@ namespace detail

/**
* @brief Smart pointer that owns an optional ownership of another object.
*
*
* The `optional_unique_ptr` acts like a `unique_ptr` or a raw pointer depending on its ownership state.
*
*
* @tparam T Element type
* @tparam Deleter Deleter
*/
Expand Down
1 change: 0 additions & 1 deletion include/papilio/utf/stralgo.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,6 @@ inline namespace literals
}
} // namespace papilio


#include "../detail/suffix.hpp"

#endif
2 changes: 1 addition & 1 deletion include/papilio/utility.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ concept pointer_like = requires(T ptr) { static_cast<bool>(ptr); } &&

/**
* @brief Get the raw pointer from a pointer-like object, e.g. shared_ptr.
*
*
* @param p The pointer-like object
* @return The raw pointer
*/
Expand Down
2 changes: 1 addition & 1 deletion script/Doxyfile.in
Original file line number Diff line number Diff line change
Expand Up @@ -2213,7 +2213,7 @@ INCLUDE_FILE_PATTERNS =
# recursively expanded use the := operator instead of the = operator.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.

PREDEFINED = PAPILIO_EXPORT=
PREDEFINED = PAPILIO_EXPORT=

# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this
# tag can be used to specify a list of macro names that should be expanded. The
Expand Down
1 change: 0 additions & 1 deletion test/test_container/fixed_flat_map.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ static_assert(papilio::is_transparent_v<ffm_t::value_compare>);
static_assert(std::is_empty_v<ffm_t::value_compare>);
} // namespace test_container


TEST(fixed_flat_map, emplace)
{
using papilio::fixed_flat_map;
Expand Down
4 changes: 2 additions & 2 deletions test/test_format/formatter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,13 +98,13 @@ TYPED_TEST(float_formatter_suite, basic)

EXPECT_EQ(PAPILIO_NS format("{}", TypeParam(0.0L)), "0");
EXPECT_EQ(PAPILIO_NS format(L"{}", TypeParam(0.0L)), L"0");

EXPECT_EQ(PAPILIO_NS format("{}", TypeParam(-0.0L)), "-0");
EXPECT_EQ(PAPILIO_NS format(L"{}", TypeParam(-0.0L)), L"-0");

EXPECT_EQ(PAPILIO_NS format("{}", TypeParam(3.14L)), "3.14");
EXPECT_EQ(PAPILIO_NS format(L"{}", TypeParam(3.14L)), L"3.14");

EXPECT_EQ(PAPILIO_NS format("{}", TypeParam(-3.14L)), "-3.14");
EXPECT_EQ(PAPILIO_NS format(L"{}", TypeParam(-3.14L)), L"-3.14");
}
Expand Down

0 comments on commit 5f48c53

Please sign in to comment.