astyle formatting

[ci skip]
This commit is contained in:
Daniel Marjamäki 2021-07-21 20:13:38 +02:00
parent d2843b70ca
commit b1547a387e
6 changed files with 15 additions and 13 deletions

View File

@ -81,7 +81,7 @@
<!-- ########## Boost smart pointers ########## --> <!-- ########## Boost smart pointers ########## -->
<!-- https://www.boost.org/doc/libs/1_70_0/libs/smart_ptr/doc/html/smart_ptr.html --> <!-- https://www.boost.org/doc/libs/1_70_0/libs/smart_ptr/doc/html/smart_ptr.html -->
<smart-pointer class-name="boost::scoped_ptr"> <smart-pointer class-name="boost::scoped_ptr">
<unique/> <unique/>
</smart-pointer> </smart-pointer>
<!-- <smart-pointer class-name="boost::scoped_array"/> Already configured as container --> <!-- <smart-pointer class-name="boost::scoped_array"/> Already configured as container -->
<smart-pointer class-name="boost::shared_ptr"/> <smart-pointer class-name="boost::shared_ptr"/>
@ -90,7 +90,7 @@
<smart-pointer class-name="boost::local_shared_ptr"/> <smart-pointer class-name="boost::local_shared_ptr"/>
<!-- https://www.boost.org/doc/libs/1_70_0/doc/html/boost/movelib/unique_ptr.html --> <!-- https://www.boost.org/doc/libs/1_70_0/doc/html/boost/movelib/unique_ptr.html -->
<smart-pointer class-name="boost::movelib::unique_ptr"> <smart-pointer class-name="boost::movelib::unique_ptr">
<unique/> <unique/>
</smart-pointer> </smart-pointer>
<!-- ########## Boost functions ########## --> <!-- ########## Boost functions ########## -->
<!-- https://www.boost.org/doc/libs/1_69_0/doc/html/boost/algorithm/join.html --> <!-- https://www.boost.org/doc/libs/1_69_0/doc/html/boost/algorithm/join.html -->

View File

@ -5228,10 +5228,10 @@
<smart-pointer class-name="QWeakPointer"/> <smart-pointer class-name="QWeakPointer"/>
<smart-pointer class-name="QPointer"/> <smart-pointer class-name="QPointer"/>
<smart-pointer class-name="QScopedPointer"> <smart-pointer class-name="QScopedPointer">
<unique/> <unique/>
</smart-pointer> </smart-pointer>
<smart-pointer class-name="QScopedArrayPointer"> <smart-pointer class-name="QScopedArrayPointer">
<unique/> <unique/>
</smart-pointer> </smart-pointer>
<!-- Internal Smart Pointers --> <!-- Internal Smart Pointers -->
<smart-pointer class-name="QtPatternist::AutoPtr"/> <smart-pointer class-name="QtPatternist::AutoPtr"/>

View File

@ -5235,10 +5235,10 @@
<!-- https://docs.wxwidgets.org/trunk/group__group__class__smartpointers.html --> <!-- https://docs.wxwidgets.org/trunk/group__group__class__smartpointers.html -->
<smart-pointer class-name="wxObjectDataPtr"/> <smart-pointer class-name="wxObjectDataPtr"/>
<smart-pointer class-name="wxScopedArray"> <smart-pointer class-name="wxScopedArray">
<unique/> <unique/>
</smart-pointer> </smart-pointer>
<smart-pointer class-name="wxScopedPtr"> <smart-pointer class-name="wxScopedPtr">
<unique/> <unique/>
</smart-pointer> </smart-pointer>
<smart-pointer class-name="wxSharedPtr"/> <smart-pointer class-name="wxSharedPtr"/>
<smart-pointer class-name="wxWeakRefDynamic"/> <smart-pointer class-name="wxWeakRefDynamic"/>

View File

@ -1508,7 +1508,10 @@ bool Library::isimporter(const std::string& file, const std::string &importer) c
return (it != mImporters.end() && it->second.count(importer) > 0); return (it != mImporters.end() && it->second.count(importer) > 0);
} }
bool Library::isSmartPointer(const Token* tok) const { return detectSmartPointer(tok); } bool Library::isSmartPointer(const Token* tok) const
{
return detectSmartPointer(tok);
}
const Library::SmartPointer* Library::detectSmartPointer(const Token* tok) const const Library::SmartPointer* Library::detectSmartPointer(const Token* tok) const
{ {

View File

@ -1205,17 +1205,17 @@ public:
nonneg int pointer; ///< 0=>not pointer, 1=>*, 2=>**, 3=>***, etc nonneg int pointer; ///< 0=>not pointer, 1=>*, 2=>**, 3=>***, etc
nonneg int constness; ///< bit 0=data, bit 1=*, bit 2=** nonneg int constness; ///< bit 0=data, bit 1=*, bit 2=**
Reference reference = Reference::None; ///< Is the outermost indirection of this type a reference or rvalue Reference reference = Reference::None; ///< Is the outermost indirection of this type a reference or rvalue
///< reference or not? pointer=2, Reference=LValue would be a T**& ///< reference or not? pointer=2, Reference=LValue would be a T**&
const Scope* typeScope; ///< if the type definition is seen this point out the type scope const Scope* typeScope; ///< if the type definition is seen this point out the type scope
const ::Type* smartPointerType; ///< Smart pointer type const ::Type* smartPointerType; ///< Smart pointer type
const Token* smartPointerTypeToken; ///< Smart pointer type token const Token* smartPointerTypeToken; ///< Smart pointer type token
const Library::SmartPointer* smartPointer; ///< Smart pointer const Library::SmartPointer* smartPointer; ///< Smart pointer
const Library::Container* container; ///< If the type is a container defined in a cfg file, this is the used const Library::Container* container; ///< If the type is a container defined in a cfg file, this is the used
///< container ///< container
const Token* containerTypeToken; ///< The container type token. the template argument token that defines the const Token* containerTypeToken; ///< The container type token. the template argument token that defines the
///< container element type. ///< container element type.
std::string originalTypeName; ///< original type name as written in the source code. eg. this might be "uint8_t" std::string originalTypeName; ///< original type name as written in the source code. eg. this might be "uint8_t"
///< when type is CHAR. ///< when type is CHAR.
ValueType() ValueType()
: sign(UNKNOWN_SIGN), : sign(UNKNOWN_SIGN),

View File

@ -1408,8 +1408,7 @@ private:
ASSERT_EQUALS("", errout.str()); ASSERT_EQUALS("", errout.str());
} }
void returnReference22() void returnReference22() {
{
check("int& f() {\n" check("int& f() {\n"
" std::unique_ptr<int> p = std::make_unique<int>(1);\n" " std::unique_ptr<int> p = std::make_unique<int>(1);\n"
" return *p;\n" " return *p;\n"