Skip to content

Commit aafb878

Browse files
style: pre-commit fixes
1 parent aab6959 commit aafb878

10 files changed

+13
-13
lines changed

tests/test_buffers.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ TEST_SUBMODULE(buffers, m) {
227227
+ std::to_string(cols) + "(*" + std::to_string(col_factor)
228228
+ ") matrix");
229229
}
230-
DiscontiguousMatrix(const DiscontiguousMatrix&) = delete;
230+
DiscontiguousMatrix(const DiscontiguousMatrix &) = delete;
231231
~DiscontiguousMatrix() {
232232
print_destroyed(this,
233233
std::to_string(rows() / m_row_factor) + "(*"

tests/test_class.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -521,7 +521,7 @@ TEST_SUBMODULE(class_, m) {
521521
// test_exception_rvalue_abort
522522
struct PyPrintDestructor {
523523
PyPrintDestructor() = default;
524-
PyPrintDestructor(const PyPrintDestructor&) = default;
524+
PyPrintDestructor(const PyPrintDestructor &) = default;
525525
~PyPrintDestructor() { py::print("Print from destructor"); }
526526
void throw_something() { throw std::runtime_error("error"); }
527527
};

tests/test_class_release_gil_before_calling_cpp_dtor.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ struct ProbeType {
2222

2323
public:
2424
explicit ProbeType(const std::string &unique_key) : unique_key{unique_key} {}
25-
ProbeType(const ProbeType&) = default;
25+
ProbeType(const ProbeType &) = default;
2626

2727
~ProbeType() {
2828
RegistryType &reg = PyGILState_Check_Results();

tests/test_cross_module_rtti/lib.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ __pragma(warning(disable : 4251))
1212
class TEST_CROSS_MODULE_RTTI_LIB_EXPORT Base : public std::enable_shared_from_this<Base> {
1313
public:
1414
Base(int a, int b);
15-
Base(const Base&) = default;
15+
Base(const Base &) = default;
1616
virtual ~Base() = default;
1717

1818
virtual int get() const;

tests/test_eigen_matrix.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ TEST_SUBMODULE(eigen_matrix, m) {
237237

238238
public:
239239
ReturnTester() { print_created(this); }
240-
ReturnTester(const ReturnTester&) = default;
240+
ReturnTester(const ReturnTester &) = default;
241241
~ReturnTester() { print_destroyed(this); }
242242
static Eigen::MatrixXd create() { return Eigen::MatrixXd::Ones(10, 10); }
243243
// NOLINTNEXTLINE(readability-const-return-type)

tests/test_numpy_array.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ TEST_SUBMODULE(numpy_array, sm) {
282282
struct ArrayClass {
283283
int data[2] = {1, 2};
284284
ArrayClass() { py::print("ArrayClass()"); }
285-
ArrayClass(const ArrayClass&) = default;
285+
ArrayClass(const ArrayClass &) = default;
286286
~ArrayClass() { py::print("~ArrayClass()"); }
287287
};
288288
py::class_<ArrayClass>(sm, "ArrayClass")

tests/test_potentially_slicing_weak_ptr.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ namespace potentially_slicing_weak_ptr {
1212
template <int> // Using int as a trick to easily generate multiple types.
1313
struct VirtBase {
1414
virtual ~VirtBase() = default;
15-
VirtBase(const VirtBase&) = delete;
15+
VirtBase(const VirtBase &) = delete;
1616
virtual int get_code() { return 100; }
1717
};
1818

tests/test_smart_ptr.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ class MyObject4a {
161161
print_created(this);
162162
pointer_set<MyObject4a>().insert(this);
163163
};
164-
MyObject4a(const MyObject4a&) = delete;
164+
MyObject4a(const MyObject4a &) = delete;
165165

166166
int value;
167167

@@ -184,15 +184,15 @@ class MyObject4a {
184184
class MyObject4b : public MyObject4a {
185185
public:
186186
explicit MyObject4b(int i) : MyObject4a(i) { print_created(this); }
187-
MyObject4b(const MyObject4b&) = delete;
187+
MyObject4b(const MyObject4b &) = delete;
188188
~MyObject4b() override { print_destroyed(this); }
189189
};
190190

191191
// test_large_holder
192192
class MyObject5 { // managed by huge_unique_ptr
193193
public:
194194
explicit MyObject5(int value) : value{value} { print_created(this); }
195-
MyObject5(const MyObject5&) = delete;
195+
MyObject5(const MyObject5 &) = delete;
196196
~MyObject5() { print_destroyed(this); }
197197
int value;
198198
};
@@ -249,7 +249,7 @@ struct SharedFromThisVirt : virtual SharedFromThisVBase {};
249249
// test_move_only_holder
250250
struct C {
251251
C() { print_created(this); }
252-
C(const C&) = delete;
252+
C(const C &) = delete;
253253
~C() { print_destroyed(this); }
254254
};
255255

tests/test_stl.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ class OptionalProperties {
9999
using OptionalEnumValue = OptionalImpl<EnumType>;
100100

101101
OptionalProperties() : value(EnumType::kSet) {}
102-
OptionalProperties(const OptionalProperties&) = default;
102+
OptionalProperties(const OptionalProperties &) = default;
103103
~OptionalProperties() {
104104
// Reset value to detect use-after-destruction.
105105
// This is set to a specific value rather than nullopt to ensure that

tests/test_tagbased_polymorphic.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ struct Animal {
1717
// (https://github.com/pybind/pybind11/pull/2016/).
1818
virtual ~Animal() = default;
1919

20-
Animal(const Animal&) = delete;
20+
Animal(const Animal &) = delete;
2121

2222
// Enum for tag-based polymorphism.
2323
enum class Kind {

0 commit comments

Comments
 (0)