mirror of
https://github.com/catchorg/Catch2.git
synced 2024-12-23 11:43:29 +01:00
Removed superfluous inline keywords
This commit is contained in:
parent
d8df83ee2f
commit
878bd140e6
@ -106,4 +106,9 @@ namespace Catch {
|
|||||||
#endif
|
#endif
|
||||||
return os;
|
return os;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool isTrue( bool value ){ return value; }
|
||||||
|
bool alwaysTrue() { return true; }
|
||||||
|
bool alwaysFalse() { return false; }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -46,12 +46,12 @@ namespace Catch {
|
|||||||
};
|
};
|
||||||
|
|
||||||
template<typename ContainerT>
|
template<typename ContainerT>
|
||||||
inline void deleteAll( ContainerT& container ) {
|
void deleteAll( ContainerT& container ) {
|
||||||
for( auto p : container )
|
for( auto p : container )
|
||||||
delete p;
|
delete p;
|
||||||
}
|
}
|
||||||
template<typename AssociativeContainerT>
|
template<typename AssociativeContainerT>
|
||||||
inline void deleteAllValues( AssociativeContainerT& container ) {
|
void deleteAllValues( AssociativeContainerT& container ) {
|
||||||
for( auto const& kvp : container )
|
for( auto const& kvp : container )
|
||||||
delete kvp.second;
|
delete kvp.second;
|
||||||
}
|
}
|
||||||
@ -96,9 +96,9 @@ namespace Catch {
|
|||||||
std::ostream& operator << ( std::ostream& os, SourceLineInfo const& info );
|
std::ostream& operator << ( std::ostream& os, SourceLineInfo const& info );
|
||||||
|
|
||||||
// This is just here to avoid compiler warnings with macro constants and boolean literals
|
// This is just here to avoid compiler warnings with macro constants and boolean literals
|
||||||
inline bool isTrue( bool value ){ return value; }
|
bool isTrue( bool value );
|
||||||
inline bool alwaysTrue() { return true; }
|
bool alwaysTrue();
|
||||||
inline bool alwaysFalse() { return false; }
|
bool alwaysFalse();
|
||||||
|
|
||||||
void seedRng( IConfig const& config );
|
void seedRng( IConfig const& config );
|
||||||
unsigned int rngSeed();
|
unsigned int rngSeed();
|
||||||
|
@ -105,7 +105,7 @@
|
|||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
namespace Catch {
|
namespace Catch {
|
||||||
inline bool isDebuggerActive() { return false; }
|
bool isDebuggerActive() { return false; }
|
||||||
}
|
}
|
||||||
#endif // Platform
|
#endif // Platform
|
||||||
|
|
||||||
|
@ -69,7 +69,7 @@ namespace Catch {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// Single, global, instance
|
// Single, global, instance
|
||||||
inline RegistryHub*& getTheRegistryHub() {
|
RegistryHub*& getTheRegistryHub() {
|
||||||
static RegistryHub* theRegistryHub = nullptr;
|
static RegistryHub* theRegistryHub = nullptr;
|
||||||
if( !theRegistryHub )
|
if( !theRegistryHub )
|
||||||
theRegistryHub = new RegistryHub();
|
theRegistryHub = new RegistryHub();
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
namespace Catch {
|
namespace Catch {
|
||||||
|
|
||||||
inline TestCaseInfo::SpecialProperties parseSpecialTag( std::string const& tag ) {
|
TestCaseInfo::SpecialProperties parseSpecialTag( std::string const& tag ) {
|
||||||
if( startsWith( tag, '.' ) ||
|
if( startsWith( tag, '.' ) ||
|
||||||
tag == "hide" ||
|
tag == "hide" ||
|
||||||
tag == "!hide" )
|
tag == "!hide" )
|
||||||
@ -32,10 +32,10 @@ namespace Catch {
|
|||||||
else
|
else
|
||||||
return TestCaseInfo::None;
|
return TestCaseInfo::None;
|
||||||
}
|
}
|
||||||
inline bool isReservedTag( std::string const& tag ) {
|
bool isReservedTag( std::string const& tag ) {
|
||||||
return parseSpecialTag( tag ) == TestCaseInfo::None && tag.size() > 0 && !std::isalnum( tag[0] );
|
return parseSpecialTag( tag ) == TestCaseInfo::None && tag.size() > 0 && !std::isalnum( tag[0] );
|
||||||
}
|
}
|
||||||
inline void enforceNotReservedTag( std::string const& tag, SourceLineInfo const& _lineInfo ) {
|
void enforceNotReservedTag( std::string const& tag, SourceLineInfo const& _lineInfo ) {
|
||||||
CATCH_ENFORCE( !isReservedTag(tag),
|
CATCH_ENFORCE( !isReservedTag(tag),
|
||||||
"Tag name: [" << tag << "] is not allowed.\n"
|
"Tag name: [" << tag << "] is not allowed.\n"
|
||||||
<< "Tag names starting with non alpha-numeric characters are reserved\n"
|
<< "Tag names starting with non alpha-numeric characters are reserved\n"
|
||||||
|
Loading…
Reference in New Issue
Block a user