diff --git a/doc/codingStyleGuide.org b/doc/codingStyleGuide.org index b8d1b0d98aa89c36cecc401b823e2af02ead82d4..8714c3373ae9a39e7f13aaf8f3b57d0f24981bf0 100644 --- a/doc/codingStyleGuide.org +++ b/doc/codingStyleGuide.org @@ -86,7 +86,7 @@ // - 0: different // - +1: identical // - -1: same face, but different orientation - static inline int compare(const triFace&, const triFace&); + static int compare(const triFace&, const triFace&); #+end_src or #+begin_src C++ @@ -95,7 +95,7 @@ // - 0: different // - +1: identical // - -1: same face, but different orientation - static inline int compare(const triFace&, const triFace&); + static int compare(const triFace&, const triFace&); #+end_src *not* #+begin_src C++ @@ -103,7 +103,7 @@ // - 0: different // - +1: identical // - -1: same face, but different orientation - static inline int compare(const triFace&, const triFace&); + static int compare(const triFace&, const triFace&); #+end_src + List can be nested for example #+begin_src C++ diff --git a/src/OpenFOAM/containers/Bits/PackedList/PackedList.H b/src/OpenFOAM/containers/Bits/PackedList/PackedList.H index 017d7f8e1b1b3f8d722ea19380a59c01b8c2f4ea..700ffb6db5272b9d7d92f80ee3fcc9b256b33d0c 100644 --- a/src/OpenFOAM/containers/Bits/PackedList/PackedList.H +++ b/src/OpenFOAM/containers/Bits/PackedList/PackedList.H @@ -229,7 +229,7 @@ public: inline constexpr PackedList() noexcept; //- Construct for given number of elements, initializes values to 0 - explicit inline PackedList(const label numElem); + inline explicit PackedList(const label numElem); //- Construct for given number of elements, and the specified //- value for each element @@ -245,10 +245,10 @@ public: inline PackedList(PackedList<Width>&& rhs); //- Construct from a list of values - explicit inline PackedList(const labelUList& values); + inline explicit PackedList(const labelUList& values); //- Construct from a list of values - explicit inline PackedList(const labelUIndList& values); + inline explicit PackedList(const labelUIndList& values); //- Clone inline autoPtr<PackedList<Width>> clone() const; diff --git a/src/OpenFOAM/containers/Bits/bitSet/bitSet.H b/src/OpenFOAM/containers/Bits/bitSet/bitSet.H index 38b0181a828c3cde00b501dd62b6ffbfb28d35a5..9f033ca29760b5f7405af1f616e88d5f4e15881d 100644 --- a/src/OpenFOAM/containers/Bits/bitSet/bitSet.H +++ b/src/OpenFOAM/containers/Bits/bitSet/bitSet.H @@ -142,7 +142,7 @@ public: explicit bitSet(Istream& is); //- Construct with given size, with all bits set to 0 - explicit inline bitSet(const label n); + inline explicit bitSet(const label n); //- Construct with given size and value for all elements inline bitSet(const label n, const bool val); @@ -154,7 +154,7 @@ public: inline bitSet(bitSet&& bitset); //- Construct from a list of bools - explicit inline bitSet(const UList<bool>& bools); + inline explicit bitSet(const UList<bool>& bools); //- Construct with given size with all bits set to 0, //- subsequently add specified locations as 1. @@ -170,11 +170,11 @@ public: //- Construct with automatic sizing (filled with 0), //- and populate with specified locations as 1. - explicit inline bitSet(const labelUList& locations); + inline explicit bitSet(const labelUList& locations); //- Construct with automatic sizing (filled with 0), //- and populate with specified locations as 1. - explicit inline bitSet(const labelUIndList& locations); + inline explicit bitSet(const labelUIndList& locations); //- Clone inline autoPtr<bitSet> clone() const; diff --git a/src/OpenFOAM/containers/HashTables/HashPtrTable/HashPtrTable.H b/src/OpenFOAM/containers/HashTables/HashPtrTable/HashPtrTable.H index 9dedb2a0ff38080a13649a1bafd197fa02f18fe5..990e8537c2143012783de9db092dfee0fafa2914 100644 --- a/src/OpenFOAM/containers/HashTables/HashPtrTable/HashPtrTable.H +++ b/src/OpenFOAM/containers/HashTables/HashPtrTable/HashPtrTable.H @@ -96,7 +96,7 @@ public: inline HashPtrTable(); //- Construct given initial table capacity - explicit inline HashPtrTable(const label size); + inline explicit HashPtrTable(const label size); //- Construct from Istream using given Istream constructor class template<class INew> diff --git a/src/OpenFOAM/containers/Lists/DynamicList/DynamicList.H b/src/OpenFOAM/containers/Lists/DynamicList/DynamicList.H index 4fa4a0fbb420f0be918c02014cbc24c52883e213..055fd7137cfbcccbc104c645c760f8b506182657 100644 --- a/src/OpenFOAM/containers/Lists/DynamicList/DynamicList.H +++ b/src/OpenFOAM/containers/Lists/DynamicList/DynamicList.H @@ -118,7 +118,7 @@ public: inline constexpr DynamicList() noexcept; //- Construct an empty list with given reserve size. - explicit inline DynamicList(const label nElem); + inline explicit DynamicList(const label nElem); //- Construct with given size and value for all elements. inline DynamicList(const label nElem, const T& val); @@ -135,7 +135,7 @@ public: //- Construct from UList. Size set to UList size. // Also constructs from DynamicList with different sizing parameters. - explicit inline DynamicList(const UList<T>& lst); + inline explicit DynamicList(const UList<T>& lst); //- Construct from a FixedList template<unsigned FixedSize> @@ -147,10 +147,10 @@ public: inline DynamicList(InputIterator begIter, InputIterator endIter); //- Construct from an initializer list. Size set to list size. - explicit inline DynamicList(std::initializer_list<T> lst); + inline explicit DynamicList(std::initializer_list<T> lst); //- Construct from UIndirectList. Size set to UIndirectList size. - explicit inline DynamicList(const UIndirectList<T>& lst); + inline explicit DynamicList(const UIndirectList<T>& lst); //- Move construct. inline DynamicList(DynamicList<T, SizeMin>&& lst); diff --git a/src/OpenFOAM/containers/Lists/FixedList/FixedList.H b/src/OpenFOAM/containers/Lists/FixedList/FixedList.H index b6f25a5021121170cc410139346a9ae1e388860d..bf954ce2bf082294490d11914bd7833ea0779a2b 100644 --- a/src/OpenFOAM/containers/Lists/FixedList/FixedList.H +++ b/src/OpenFOAM/containers/Lists/FixedList/FixedList.H @@ -162,13 +162,13 @@ public: inline FixedList() = default; //- Construct and initialize all entries to given value - explicit inline FixedList(const T& val); + inline explicit FixedList(const T& val); //- Construct and initialize all entries to zero - explicit inline FixedList(const zero); + inline explicit FixedList(const zero); //- Copy construct from C-array - explicit inline FixedList(const T list[Size]); + inline explicit FixedList(const T list[Size]); //- Copy constructor inline FixedList(const FixedList<T, Size>& list); @@ -186,10 +186,10 @@ public: inline FixedList(std::initializer_list<T> list); //- Construct from UList - explicit inline FixedList(const UList<T>& list); + inline explicit FixedList(const UList<T>& list); //- Construct from SLList - explicit inline FixedList(const SLList<T>& list); + inline explicit FixedList(const SLList<T>& list); //- Construct from Istream FixedList(Istream& is); diff --git a/src/OpenFOAM/containers/Lists/IndirectList/IndirectList.H b/src/OpenFOAM/containers/Lists/IndirectList/IndirectList.H index 6cb2dc576e24dadf3bbedf07ad6e5cc894883718..1944b7b1df767e4674a1fe2725b3b7b2a6790fb7 100644 --- a/src/OpenFOAM/containers/Lists/IndirectList/IndirectList.H +++ b/src/OpenFOAM/containers/Lists/IndirectList/IndirectList.H @@ -73,10 +73,10 @@ protected: // Constructors //- Copy construct from addressing array - explicit inline IndirectListAddressing(const labelUList& addr); + inline explicit IndirectListAddressing(const labelUList& addr); //- Move construct from addressing array - explicit inline IndirectListAddressing(List<label>&& addr); + inline explicit IndirectListAddressing(List<label>&& addr); // Member Functions @@ -127,7 +127,7 @@ public: //- Copy construct addressing, shallow copy values list reference //- from UIndirectList - explicit inline IndirectList(const UIndirectList<T>& list); + inline explicit IndirectList(const UIndirectList<T>& list); // Member Functions diff --git a/src/OpenFOAM/containers/Lists/SortableList/SortableList.H b/src/OpenFOAM/containers/Lists/SortableList/SortableList.H index c86656ffff61948a18fcfeb68349166906f94227..fe846ead3069f45d0093edb775406964e10b6f10 100644 --- a/src/OpenFOAM/containers/Lists/SortableList/SortableList.H +++ b/src/OpenFOAM/containers/Lists/SortableList/SortableList.H @@ -69,7 +69,7 @@ public: //- Construct given size, sort later. // The indices remain empty until the list is sorted - explicit inline SortableList(const label size); + inline explicit SortableList(const label size); //- Construct given size and initial value. Sort later on // The indices remain empty until the list is sorted diff --git a/src/OpenFOAM/containers/PtrLists/PtrDynList/PtrDynList.H b/src/OpenFOAM/containers/PtrLists/PtrDynList/PtrDynList.H index c89d4e9f5ddb108e691c878958b30a90bef2040f..f2c653973b74f353687dad7f4bba0048cfbd9b19 100644 --- a/src/OpenFOAM/containers/PtrLists/PtrDynList/PtrDynList.H +++ b/src/OpenFOAM/containers/PtrLists/PtrDynList/PtrDynList.H @@ -75,7 +75,7 @@ public: inline constexpr PtrDynList() noexcept; //- Construct with given capacity. - explicit inline PtrDynList(const label len); + inline explicit PtrDynList(const label len); //- Copy construct using 'clone()' method on each element inline PtrDynList(const PtrDynList<T, SizeMin>& list); diff --git a/src/OpenFOAM/containers/PtrLists/PtrList/PtrList.H b/src/OpenFOAM/containers/PtrLists/PtrList/PtrList.H index 7cdf1367a006d9fef7747d30c87574383a604c67..4ceda992a31777bd747a9ad37a4c4a3a7cb6cfbe 100644 --- a/src/OpenFOAM/containers/PtrLists/PtrList/PtrList.H +++ b/src/OpenFOAM/containers/PtrLists/PtrList/PtrList.H @@ -88,7 +88,7 @@ public: inline constexpr PtrList() noexcept; //- Construct with specified size, each element initialized to nullptr - explicit inline PtrList(const label len); + inline explicit PtrList(const label len); //- Copy construct using 'clone()' method on each element inline PtrList(const PtrList<T>& list); diff --git a/src/OpenFOAM/containers/PtrLists/UPtrList/UPtrList.H b/src/OpenFOAM/containers/PtrLists/UPtrList/UPtrList.H index 212adf26e4f68efbc5246f4763a0701901a0f5ad..37bb8d97ec3f830005616db4b0ef665925120f01 100644 --- a/src/OpenFOAM/containers/PtrLists/UPtrList/UPtrList.H +++ b/src/OpenFOAM/containers/PtrLists/UPtrList/UPtrList.H @@ -110,7 +110,7 @@ public: inline constexpr UPtrList() noexcept; //- Construct with specified size, each element initialized to nullptr - explicit inline UPtrList(const label len); + inline explicit UPtrList(const label len); //- Copy construct (shallow copies addresses) inline UPtrList(const UPtrList<T>& list); @@ -129,7 +129,7 @@ public: //- Construct from UList, taking the address of each list element // The argument is non-const to reflect that the UPtrList can change // the values of the original list. - explicit inline UPtrList(UList<T>& list); + inline explicit UPtrList(UList<T>& list); // Member functions diff --git a/src/OpenFOAM/fields/Fields/DynamicField/DynamicField.H b/src/OpenFOAM/fields/Fields/DynamicField/DynamicField.H index 18559ad7b64866141e76a581b906d3f87003dc9e..0d4d7c2d45494d3cb3eac0616559fc54cefb0928 100644 --- a/src/OpenFOAM/fields/Fields/DynamicField/DynamicField.H +++ b/src/OpenFOAM/fields/Fields/DynamicField/DynamicField.H @@ -103,7 +103,7 @@ public: inline constexpr DynamicField() noexcept; //- Construct empty field with given reserve size. - explicit inline DynamicField(const label len); + inline explicit DynamicField(const label len); //- Construct given size and initial value inline DynamicField(const label len, const T& val); @@ -120,13 +120,13 @@ public: //- Copy construct from UList. Size set to UList size. // Also constructs from DynamicField with different sizing parameters. - explicit inline DynamicField(const UList<T>& list); + inline explicit DynamicField(const UList<T>& list); //- Copy construct from UIndirectList - explicit inline DynamicField(const UIndirectList<T>& list); + inline explicit DynamicField(const UIndirectList<T>& list); //- Move construct from List contents - explicit inline DynamicField(List<T>&& content); + inline explicit DynamicField(List<T>&& content); //- Move construct from dynamic Field contents inline DynamicField(DynamicField<T, SizeMin>&& content); diff --git a/src/OpenFOAM/fields/Fields/Field/SubField.H b/src/OpenFOAM/fields/Fields/Field/SubField.H index 1a7fb9cb91365e56c3d8e66e4806b7ac474c11f8..9509a65499f8160e5b65f2dd9e274cd235d5a66b 100644 --- a/src/OpenFOAM/fields/Fields/Field/SubField.H +++ b/src/OpenFOAM/fields/Fields/Field/SubField.H @@ -75,7 +75,7 @@ public: inline SubField(const SubList<Type>&); //- Construct from a UList\<Type\>, using the entire size - explicit inline SubField(const UList<Type>&); + inline explicit SubField(const UList<Type>&); //- Construct from a UList\<Type\> with a given size inline SubField diff --git a/src/OpenFOAM/meshes/boundBox/boundBox.H b/src/OpenFOAM/meshes/boundBox/boundBox.H index a387e74ab79ad3757137a6dd51a1fd2637435a36..abba73f8815f5d70d8341bc74ea06ca95b20f2a7 100644 --- a/src/OpenFOAM/meshes/boundBox/boundBox.H +++ b/src/OpenFOAM/meshes/boundBox/boundBox.H @@ -85,7 +85,7 @@ public: inline boundBox(); //- Construct a bounding box containing a single initial point - explicit inline boundBox(const point& pt); + inline explicit boundBox(const point& pt); //- Construct from components inline boundBox(const point& min, const point& max); diff --git a/src/OpenFOAM/meshes/meshShapes/cell/cell.H b/src/OpenFOAM/meshes/meshShapes/cell/cell.H index b1269443f3b7fae96b0785d5b8f6ba5f2e58871f..6cba1b8866452c5c7e0974ba75f26250ec8832ad 100644 --- a/src/OpenFOAM/meshes/meshShapes/cell/cell.H +++ b/src/OpenFOAM/meshes/meshShapes/cell/cell.H @@ -67,13 +67,13 @@ public: inline cell(); //- Construct given size, with invalid point labels (-1) - explicit inline cell(const label sz); + inline explicit cell(const label sz); //- Copy construct from list of labels - explicit inline cell(const labelUList& lst); + inline explicit cell(const labelUList& lst); //- Move construct from list of labels - explicit inline cell(labelList&& lst); + inline explicit cell(labelList&& lst); //- Construct from Istream inline cell(Istream& is); diff --git a/src/OpenFOAM/meshes/meshShapes/face/face.H b/src/OpenFOAM/meshes/meshShapes/face/face.H index 2691c30f0966cc4e7db1c81a86f0da3ba3399e68..61f2060f10a91d3b43fea1e186db092f98e9a935 100644 --- a/src/OpenFOAM/meshes/meshShapes/face/face.H +++ b/src/OpenFOAM/meshes/meshShapes/face/face.H @@ -148,20 +148,20 @@ public: inline face(); //- Construct given size, with invalid point labels (-1) - explicit inline face(const label sz); + inline explicit face(const label sz); //- Copy construct from list of labels - explicit inline face(const labelUList& lst); + inline explicit face(const labelUList& lst); //- Copy construct from list of labels template<unsigned Size> - explicit inline face(const FixedList<label, Size>& lst); + inline explicit face(const FixedList<label, Size>& lst); //- Copy construct from an initializer list of labels - explicit inline face(std::initializer_list<label> lst); + inline explicit face(std::initializer_list<label> lst); //- Move construct from list of labels - explicit inline face(labelList&& lst); + inline explicit face(labelList&& lst); //- Copy construct from triFace face(const triFace& f); diff --git a/src/OpenFOAM/meshes/meshShapes/labelledTri/labelledTri.H b/src/OpenFOAM/meshes/meshShapes/labelledTri/labelledTri.H index ad7b55ab6dea35c2db97ff5629e5a605c0421a76..3f8bb16b684f0041ffa73974b8aedd610c2893d9 100644 --- a/src/OpenFOAM/meshes/meshShapes/labelledTri/labelledTri.H +++ b/src/OpenFOAM/meshes/meshShapes/labelledTri/labelledTri.H @@ -97,10 +97,10 @@ public: //- Construct from a list of 3 or 4 labels. // Default region is 0. - explicit inline labelledTri(const labelUList&); + inline explicit labelledTri(const labelUList&); //- Construct from an initializer list of 3 or 4 labels. - explicit inline labelledTri(std::initializer_list<label>); + inline explicit labelledTri(std::initializer_list<label>); //- Construct from Istream inline labelledTri(Istream&); diff --git a/src/OpenFOAM/meshes/meshShapes/tetCell/tetCell.H b/src/OpenFOAM/meshes/meshShapes/tetCell/tetCell.H index 0208b85aca515b147dbda093e6091277ea6c1cf1..c66712202c0f2302b67184135862e43541ef9934 100644 --- a/src/OpenFOAM/meshes/meshShapes/tetCell/tetCell.H +++ b/src/OpenFOAM/meshes/meshShapes/tetCell/tetCell.H @@ -81,7 +81,7 @@ public: inline tetCell(const FixedList<label, 4>& lst); //- Construct from an initializer list of four point labels - explicit inline tetCell(std::initializer_list<label> lst); + inline explicit tetCell(std::initializer_list<label> lst); //- Construct from Istream inline tetCell(Istream& is); diff --git a/src/OpenFOAM/meshes/meshShapes/triFace/triFace.H b/src/OpenFOAM/meshes/meshShapes/triFace/triFace.H index 442f1bc16d77e6411a3607a3d4d9011905ff1a92..68a41feebd5c647f340054ee3df0cef4cb7e3b5f 100644 --- a/src/OpenFOAM/meshes/meshShapes/triFace/triFace.H +++ b/src/OpenFOAM/meshes/meshShapes/triFace/triFace.H @@ -87,10 +87,10 @@ public: ); //- Copy construct from a list of three point labels. - explicit inline triFace(const labelUList& lst); + inline explicit triFace(const labelUList& lst); //- Construct from an initializer list of three point labels - explicit inline triFace(std::initializer_list<label> lst); + inline explicit triFace(std::initializer_list<label> lst); //- Construct from Istream inline triFace(Istream& is); diff --git a/src/OpenFOAM/meshes/treeBoundBox/treeBoundBox.H b/src/OpenFOAM/meshes/treeBoundBox/treeBoundBox.H index adcac28e03554c28a30612ad62e1e745156d7e88..7177cb020f852c478cc8bae15450616733e3bbbb 100644 --- a/src/OpenFOAM/meshes/treeBoundBox/treeBoundBox.H +++ b/src/OpenFOAM/meshes/treeBoundBox/treeBoundBox.H @@ -162,10 +162,10 @@ public: inline treeBoundBox(); //- Construct from a boundBox - explicit inline treeBoundBox(const boundBox& bb); + inline explicit treeBoundBox(const boundBox& bb); //- Construct a bounding box containing a single initial point - explicit inline treeBoundBox(const point& pt); + inline explicit treeBoundBox(const point& pt); //- Construct from components inline treeBoundBox(const point& min, const point& max); diff --git a/src/OpenFOAM/primitives/hashes/SHA1/SHA1.H b/src/OpenFOAM/primitives/hashes/SHA1/SHA1.H index dfbd26b2cce5af6f405a1ecfe227feed6ed3416b..1af8c4a2fc963848db5d592a1a0e5027db5a555d 100644 --- a/src/OpenFOAM/primitives/hashes/SHA1/SHA1.H +++ b/src/OpenFOAM/primitives/hashes/SHA1/SHA1.H @@ -108,10 +108,10 @@ public: inline SHA1(); //- Construct null and append initial std::string - explicit inline SHA1(const std::string&); + inline explicit SHA1(const std::string&); //- Construct null and append initial string - explicit inline SHA1(const char*); + inline explicit SHA1(const char*); // Member Functions diff --git a/src/OpenFOAM/primitives/ranges/scalarRange/scalarRange.H b/src/OpenFOAM/primitives/ranges/scalarRange/scalarRange.H index 415673ad992ac82375ba11d93d97bf3ff1def06f..8ab33c987c5fd4895524fdacad9078b808636913 100644 --- a/src/OpenFOAM/primitives/ranges/scalarRange/scalarRange.H +++ b/src/OpenFOAM/primitives/ranges/scalarRange/scalarRange.H @@ -92,7 +92,7 @@ public: inline scalarRange(); //- Construct an exact value matcher - explicit inline scalarRange(const scalar value); + inline explicit scalarRange(const scalar value); //- Construct a range from min-value to max-value inline scalarRange(const scalar minVal, const scalar maxVal); diff --git a/src/OpenFOAM/primitives/strings/lists/hashedWordList.H b/src/OpenFOAM/primitives/strings/lists/hashedWordList.H index c7a451942e43f661f2e9bfb072b2eb11f8cf7c09..4d4089037e3e7a4d5765ecc6cc87b50668e2b53c 100644 --- a/src/OpenFOAM/primitives/strings/lists/hashedWordList.H +++ b/src/OpenFOAM/primitives/strings/lists/hashedWordList.H @@ -92,7 +92,7 @@ public: // This also handles a wordHashSet, which is derived from a HashTable. // The result is similar to a HashTable::sortedToc. template<class AnyType, class AnyHash> - explicit inline hashedWordList + inline explicit hashedWordList ( const HashTable<AnyType, word, AnyHash>& tbl );