Skip to content

Commit 781e5b1

Browse files
committed
Align consecutive assignments
1 parent 4db7a6e commit 781e5b1

File tree

5 files changed

+13
-12
lines changed

5 files changed

+13
-12
lines changed

.clang-format

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ IncludeCategories:
1414
- Regex: ".*"
1515
Priority: 4
1616

17+
AlignConsecutiveAssignments: true
1718
InsertBraces: true
1819
KeepEmptyLinesAtTheStartOfBlocks: false
1920
PackConstructorInitializers: Never

include/tmp/directory

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public:
5454
explicit directory(std::string_view prefix = "")
5555
: pathobject(detail::create_directory(prefix)) {}
5656

57-
directory(const directory&) = delete;
57+
directory(const directory&) = delete;
5858
directory& operator=(const directory&) = delete;
5959

6060
/// Moves the ownership of the directory managed by `other` to a new handle

include/tmp/file

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,10 @@ extern "C++" int get_native_handle(std::FILE* file) noexcept;
6464
template<class charT, class traits = std::char_traits<charT>>
6565
class basic_file : public std::basic_iostream<charT, traits> {
6666
public:
67-
using char_type = charT;
68-
using int_type = typename traits::int_type;
69-
using pos_type = typename traits::pos_type;
70-
using off_type = typename traits::off_type;
67+
using char_type = charT;
68+
using int_type = typename traits::int_type;
69+
using pos_type = typename traits::pos_type;
70+
using off_type = typename traits::off_type;
7171
using traits_type = traits;
7272

7373
/// Implementation-defined handle type to the file
@@ -81,7 +81,7 @@ public:
8181
underlying(detail::create_file(), &std::fclose),
8282
sb(open_filebuf(underlying.get())) {}
8383

84-
basic_file(const basic_file&) = delete;
84+
basic_file(const basic_file&) = delete;
8585
basic_file& operator=(const basic_file&) = delete;
8686

8787
/// Moves the ownership of the file managed by `other` to a new handle
@@ -147,7 +147,7 @@ private:
147147
}
148148
};
149149

150-
using file = basic_file<char>;
150+
using file = basic_file<char>;
151151
using wfile = basic_file<wchar_t>;
152152
} // namespace tmp
153153

tests/directory.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ constexpr std::string_view prefix = "com.github.bugdea1er.tmp";
2424
/// Tests directory creation with prefix
2525
TEST(directory, create_with_prefix) {
2626
directory tmpdir = directory(prefix);
27-
fs::path parent = tmpdir.path().parent_path();
27+
fs::path parent = tmpdir.path().parent_path();
2828

2929
EXPECT_TRUE(fs::exists(tmpdir));
3030
EXPECT_TRUE(fs::is_directory(tmpdir));
@@ -52,7 +52,7 @@ TEST(directory, create_with_prefix) {
5252
/// Tests directory creation without prefix
5353
TEST(directory, create_without_prefix) {
5454
directory tmpdir = directory();
55-
fs::path parent = tmpdir.path().parent_path();
55+
fs::path parent = tmpdir.path().parent_path();
5656

5757
EXPECT_TRUE(fs::exists(tmpdir));
5858
EXPECT_TRUE(fs::is_directory(tmpdir));
@@ -85,7 +85,7 @@ TEST(directory, create_invalid_prefix) {
8585

8686
/// Tests `operator/` of directory
8787
TEST(directory, subpath) {
88-
directory tmpdir = directory();
88+
directory tmpdir = directory();
8989
fs::path expected = tmpdir.path() / "child";
9090
std::ofstream(expected) << "Hello, world!";
9191

@@ -104,7 +104,7 @@ TEST(directory, destructor) {
104104
fs::path path;
105105
{
106106
directory tmpdir = directory();
107-
path = tmpdir;
107+
path = tmpdir;
108108
}
109109

110110
EXPECT_FALSE(fs::exists(path));

tests/file.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ TYPED_TEST(file, destructor) {
113113

114114
{
115115
basic_file<TypeParam> tmpfile = basic_file<TypeParam>();
116-
handle = tmpfile.native_handle();
116+
handle = tmpfile.native_handle();
117117
}
118118

119119
EXPECT_FALSE(TestFixture::is_open(handle));

0 commit comments

Comments
 (0)