diff --git a/app/main.cc b/app/main.cc index 23fb2d840..fdb0bab3a 100644 --- a/app/main.cc +++ b/app/main.cc @@ -170,7 +170,7 @@ int main(int argc, char **argv) } // set properties - std::vector> properties; + std::vector> properties; properties.push_back({{1,0,0}}); // temperature for (size_t c = 0; c < compositions; ++c) diff --git a/include/doctest/doctest.h b/include/doctest/doctest.h index f9185343f..d46a63bdf 100644 --- a/include/doctest/doctest.h +++ b/include/doctest/doctest.h @@ -575,7 +575,7 @@ namespace doctest String &operator+=(const String &other); String(String &&other); - String &operator=(String&& other); + String &operator=(String &&other); char operator[](unsigned i) const; char &operator[](unsigned i); @@ -878,7 +878,7 @@ namespace doctest { typedef T type; }; - template struct remove_reference + template struct remove_reference { typedef T type; }; @@ -902,7 +902,7 @@ namespace doctest { const static bool value=false; }; - template struct is_rvalue_reference + template struct is_rvalue_reference { const static bool value=true; }; @@ -917,7 +917,7 @@ namespace doctest inline T &&forward(typename remove_reference::type &&t) DOCTEST_NOEXCEPT { static_assert(!is_lvalue_reference::value, - "Can not forward an rvalue as an lvalue."); + "Can not forward an rvalue as an lvalue."); return static_cast(t); } @@ -947,7 +947,7 @@ namespace doctest template struct deferred_false - // cppcheck-suppress unusedStructMember + // cppcheck-suppress unusedStructMember { static const bool value = false; }; @@ -3904,14 +3904,14 @@ namespace doctest return *this; } - String::String(String&& other) + String::String(String &&other) { memcpy(buf, other.buf, len); other.buf[0] = '\0'; other.setLast(); } - String &String::operator=(String&& other) + String &String::operator=(String &&other) { if (this != &other) { @@ -5607,8 +5607,8 @@ namespace doctest public: ScopedElement( XmlWriter *writer ); - ScopedElement( ScopedElement&& other ) DOCTEST_NOEXCEPT; - ScopedElement &operator=( ScopedElement&& other ) DOCTEST_NOEXCEPT; + ScopedElement( ScopedElement &&other ) DOCTEST_NOEXCEPT; + ScopedElement &operator=( ScopedElement &&other ) DOCTEST_NOEXCEPT; ~ScopedElement(); @@ -5852,13 +5852,13 @@ namespace doctest : m_writer( writer ) {} - XmlWriter::ScopedElement::ScopedElement( ScopedElement&& other ) DOCTEST_NOEXCEPT + XmlWriter::ScopedElement::ScopedElement( ScopedElement &&other ) DOCTEST_NOEXCEPT : m_writer( other.m_writer ) { other.m_writer = nullptr; } - XmlWriter::ScopedElement &XmlWriter::ScopedElement::operator=( ScopedElement&& other ) DOCTEST_NOEXCEPT + XmlWriter::ScopedElement &XmlWriter::ScopedElement::operator=( ScopedElement &&other ) DOCTEST_NOEXCEPT { if ( m_writer ) { @@ -7379,14 +7379,14 @@ namespace doctest parseFlag(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX sname)) \ p->var = true; \ else if(withDefaults) \ - p->var = default + p->var = default #define DOCTEST_PARSE_INT_OPTION(name, sname, var, default) \ if(parseIntOption(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX name "=", option_int, intRes) || \ parseIntOption(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX sname "=", option_int, intRes)) \ p->var = intRes; \ else if(withDefaults) \ - p->var = default + p->var = default #define DOCTEST_PARSE_STR_OPTION(name, sname, var, default) \ if(parseOption(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX name "=", &strRes, default) || \ diff --git a/include/rapidjson/document.h b/include/rapidjson/document.h index 846b4a305..24ebf795d 100644 --- a/include/rapidjson/document.h +++ b/include/rapidjson/document.h @@ -882,7 +882,7 @@ class GenericValue //! Move assignment from a GenericDocument is not permitted. template - GenericValue &operator=(GenericDocument&& rhs); + GenericValue &operator=(GenericDocument &&rhs); #endif public: @@ -1164,7 +1164,7 @@ class GenericValue #if RAPIDJSON_HAS_CXX11_RVALUE_REFS //! Move assignment in C++11 - GenericValue &operator=(GenericValue&& rhs) RAPIDJSON_NOEXCEPT + GenericValue &operator=(GenericValue &&rhs) RAPIDJSON_NOEXCEPT { return *this = rhs.Move(); } @@ -2910,7 +2910,7 @@ class GenericDocument : public GenericValue #if RAPIDJSON_HAS_CXX11_RVALUE_REFS //! Move assignment in C++11 - GenericDocument &operator=(GenericDocument&& rhs) RAPIDJSON_NOEXCEPT + GenericDocument &operator=(GenericDocument &&rhs) RAPIDJSON_NOEXCEPT { // The cast to ValueType is necessary here, because otherwise it would // attempt to call GenericValue's templated assignment operator. diff --git a/include/rapidjson/internal/diyfp.h b/include/rapidjson/internal/diyfp.h index 09de01611..882594969 100644 --- a/include/rapidjson/internal/diyfp.h +++ b/include/rapidjson/internal/diyfp.h @@ -242,15 +242,15 @@ namespace internal static const int16_t kCachedPowers_E[] = { -1220, -1193, -1166, -1140, -1113, -1087, -1060, -1034, -1007, -980, - -954, -927, -901, -874, -847, -821, -794, -768, -741, -715, - -688, -661, -635, -608, -582, -555, -529, -502, -475, -449, - -422, -396, -369, -343, -316, -289, -263, -236, -210, -183, - -157, -130, -103, -77, -50, -24, 3, 30, 56, 83, - 109, 136, 162, 189, 216, 242, 269, 295, 322, 348, - 375, 402, 428, 455, 481, 508, 534, 561, 588, 614, - 641, 667, 694, 720, 747, 774, 800, 827, 853, 880, - 907, 933, 960, 986, 1013, 1039, 1066 - }; + -954, -927, -901, -874, -847, -821, -794, -768, -741, -715, + -688, -661, -635, -608, -582, -555, -529, -502, -475, -449, + -422, -396, -369, -343, -316, -289, -263, -236, -210, -183, + -157, -130, -103, -77, -50, -24, 3, 30, 56, 83, + 109, 136, 162, 189, 216, 242, 269, 295, 322, 348, + 375, 402, 428, 455, 481, 508, 534, 561, 588, 614, + 641, 667, 694, 720, 747, 774, 800, 827, 853, 880, + 907, 933, 960, 986, 1013, 1039, 1066 + }; RAPIDJSON_ASSERT(index < 87); return DiyFp(kCachedPowers_F[index], kCachedPowers_E[index]); } diff --git a/include/rapidjson/internal/stack.h b/include/rapidjson/internal/stack.h index 8d64a7a45..4acd29151 100644 --- a/include/rapidjson/internal/stack.h +++ b/include/rapidjson/internal/stack.h @@ -67,7 +67,7 @@ namespace internal } #if RAPIDJSON_HAS_CXX11_RVALUE_REFS - Stack &operator=(Stack&& rhs) + Stack &operator=(Stack &&rhs) { if (&rhs != this) { diff --git a/include/rapidjson/schema.h b/include/rapidjson/schema.h index 66a90b3a4..823370c5e 100644 --- a/include/rapidjson/schema.h +++ b/include/rapidjson/schema.h @@ -2626,7 +2626,7 @@ class GenericSchemaValidator : if (count > 0) { CurrentContext().objectPatternValidatorType = patternValidatorType; - ISchemaValidator ** &va = CurrentContext().patternPropertiesValidators; + ISchemaValidator** &va = CurrentContext().patternPropertiesValidators; SizeType &validatorCount = CurrentContext().patternPropertiesValidatorCount; va = static_cast(MallocState(sizeof(ISchemaValidator *) * count)); for (SizeType i = 0; i < count; i++) diff --git a/include/rapidjson/stringbuffer.h b/include/rapidjson/stringbuffer.h index 1e917796e..2bfb794d7 100644 --- a/include/rapidjson/stringbuffer.h +++ b/include/rapidjson/stringbuffer.h @@ -47,7 +47,7 @@ class GenericStringBuffer #if RAPIDJSON_HAS_CXX11_RVALUE_REFS GenericStringBuffer(GenericStringBuffer &&rhs) : stack_(std::move(rhs.stack_)) {} - GenericStringBuffer &operator=(GenericStringBuffer&& rhs) + GenericStringBuffer &operator=(GenericStringBuffer &&rhs) { if (&rhs != this) stack_ = std::move(rhs.stack_); diff --git a/include/world_builder/bounding_box.h b/include/world_builder/bounding_box.h index cd58fc37c..6b074343e 100644 --- a/include/world_builder/bounding_box.h +++ b/include/world_builder/bounding_box.h @@ -239,14 +239,14 @@ namespace WorldBuilder : boundary_points ({{ -std::numeric_limits::max(), - -std::numeric_limits::max(), - cartesian - }, + -std::numeric_limits::max(), + cartesian + }, { +std::numeric_limits::max(), - +std::numeric_limits::max(), - cartesian - } + +std::numeric_limits::max(), + cartesian + } }) {} @@ -255,16 +255,16 @@ namespace WorldBuilder : boundary_points ({{ -std::numeric_limits::max(), - -std::numeric_limits::max(), - -std::numeric_limits::max(), - cartesian - }, + -std::numeric_limits::max(), + -std::numeric_limits::max(), + cartesian + }, { +std::numeric_limits::max(), - +std::numeric_limits::max(), - +std::numeric_limits::max(), - cartesian - } + +std::numeric_limits::max(), + +std::numeric_limits::max(), + cartesian + } }) {} diff --git a/source/features/fault.cc b/source/features/fault.cc index 8b4715468..cb301f73d 100644 --- a/source/features/fault.cc +++ b/source/features/fault.cc @@ -369,11 +369,11 @@ namespace WorldBuilder const double buffer_around_fault_spherical = 2 * const_pi * buffer_around_fault_cartesian * starting_radius_inv; - spherical_bounding_box.first = {(min_along_x - buffer_around_fault_spherical * min_lat_cos_inv) , + spherical_bounding_box.first = {(min_along_x - buffer_around_fault_spherical * min_lat_cos_inv), (min_along_y - buffer_around_fault_spherical), spherical } ; - spherical_bounding_box.second = {(max_along_x + buffer_around_fault_spherical * max_lat_cos_inv) , + spherical_bounding_box.second = {(max_along_x + buffer_around_fault_spherical * max_lat_cos_inv), (max_along_y + buffer_around_fault_spherical), spherical }; } diff --git a/source/features/subducting_plate.cc b/source/features/subducting_plate.cc index 6d7a55350..9e388d996 100644 --- a/source/features/subducting_plate.cc +++ b/source/features/subducting_plate.cc @@ -380,11 +380,11 @@ namespace WorldBuilder const double buffer_around_slab_spherical = 2 * const_pi * buffer_around_slab_cartesian * starting_radius_inv; - spherical_bounding_box.first = {(min_along_x - buffer_around_slab_spherical * min_lat_cos_inv) , + spherical_bounding_box.first = {(min_along_x - buffer_around_slab_spherical * min_lat_cos_inv), (min_along_y - buffer_around_slab_spherical), spherical } ; - spherical_bounding_box.second = {(max_along_x + buffer_around_slab_spherical * max_lat_cos_inv) , + spherical_bounding_box.second = {(max_along_x + buffer_around_slab_spherical * max_lat_cos_inv), (max_along_y + buffer_around_slab_spherical), spherical }; } diff --git a/source/parameters.cc b/source/parameters.cc index cb5afaee7..a793e30a7 100644 --- a/source/parameters.cc +++ b/source/parameters.cc @@ -122,7 +122,7 @@ namespace WorldBuilder // relaxing sytax by allowing comments () for now, maybe also allow trailing commas and (kParseTrailingCommasFlag) and nan's, inf etc (kParseNanAndInfFlag)? //WBAssertThrow(!parameters.ParseStream(isw).HasParseError(), "Parsing erros world builder file"); - WBAssertThrowExc(!(parameters.ParseStream(isw).HasParseError()), std::ifstream json_input_stream_error(filename.c_str()); , + WBAssertThrowExc(!(parameters.ParseStream(isw).HasParseError()), std::ifstream json_input_stream_error(filename.c_str());, "Parsing errors world builder file: Error(offset " << static_cast(parameters.GetErrorOffset()) << "): " << GetParseError_En(parameters.GetParseError()) << std::endl << std::endl << " Showing 50 chars before and after: " diff --git a/source/utilities.cc b/source/utilities.cc index 9bb298dde..d859faad5 100644 --- a/source/utilities.cc +++ b/source/utilities.cc @@ -1316,7 +1316,7 @@ namespace WorldBuilder WBAssert(std::fabs((end_segment-center_circle).norm() - std::fabs(radius_angle_circle)) - < 1e-8 * std::fabs((end_segment-center_circle).norm() + std::fabs(radius_angle_circle)) , + < 1e-8 * std::fabs((end_segment-center_circle).norm() + std::fabs(radius_angle_circle)), "Internal error: The center of the circle is not a radius away from the end point. " << std::endl << "The center is located at " << center_circle[0] << ':' << center_circle[1] << std::endl << "The end point is located at " << end_segment[0] << ':' << end_segment[1] << std::endl diff --git a/tests/unit_tests/unit_test_world_builder.cc b/tests/unit_tests/unit_test_world_builder.cc index 7beb524fb..0aec33820 100644 --- a/tests/unit_tests/unit_test_world_builder.cc +++ b/tests/unit_tests/unit_test_world_builder.cc @@ -1273,13 +1273,13 @@ TEST_CASE("WorldBuilder Features: Continental Plate") std::vector approvals; - for (auto&& value : approval_tests) + for (auto &&value : approval_tests) { std::stringstream s; s << value; approvals.emplace_back(s.str()); } - for (auto&& value : approval_tests_grains) + for (auto &&value : approval_tests_grains) { std::stringstream s; s << value; @@ -1518,13 +1518,13 @@ TEST_CASE("WorldBuilder Features: Mantle layer") approval_tests.emplace_back(world1.composition(position, 260e3+350e3, 9)); std::vector approvals; - for (auto&& value : approval_tests) + for (auto &&value : approval_tests) { std::stringstream s; s << value; approvals.emplace_back(s.str()); } - for (auto&& value : approval_tests_grains) + for (auto &&value : approval_tests_grains) { std::stringstream s; s << value; @@ -1905,13 +1905,13 @@ TEST_CASE("WorldBuilder Features: Oceanic Plate") approval_tests.emplace_back(world2.temperature(position, 260e3)); std::vector approvals; - for (auto&& value : approval_tests) + for (auto &&value : approval_tests) { std::stringstream s; s << value; approvals.emplace_back(s.str()); } - for (auto&& value : approval_tests_grains) + for (auto &&value : approval_tests_grains) { std::stringstream s; s << value; @@ -2333,13 +2333,13 @@ TEST_CASE("WorldBuilder Features: Subducting Plate") std::vector approvals; - for (auto&& value : approval_tests) + for (auto &&value : approval_tests) { std::stringstream s; s << value; approvals.emplace_back(s.str()); } - for (auto&& value : approval_tests_grains) + for (auto &&value : approval_tests_grains) { std::stringstream s; s << value; @@ -2943,13 +2943,13 @@ TEST_CASE("WorldBuilder Features: Fault") approval_tests.emplace_back(world4.composition(position, 100e3, 0)); std::vector approvals; - for (auto&& value : approval_tests) + for (auto &&value : approval_tests) { std::stringstream s; s << value; approvals.emplace_back(s.str()); } - for (auto&& value : approval_tests_grains) + for (auto &&value : approval_tests_grains) { std::stringstream s; s << value << " "; diff --git a/visualization/main.cc b/visualization/main.cc index 81f1813f5..106440e17 100644 --- a/visualization/main.cc +++ b/visualization/main.cc @@ -1438,7 +1438,7 @@ int main(int argc, char **argv) std::cout << "[5/6] Preparing to write the paraview file: stage 5 of 5, computing the properties \r"; std::cout.flush(); - std::vector> properties; + std::vector> properties; properties.push_back({{1,0,0}}); // temperature for (size_t c = 0; c < compositions; ++c)