mirror of
https://github.com/catchorg/Catch2.git
synced 2025-09-16 10:05:39 +02:00
Use const char* for filename in SourceLineInfo
This is sane, because those `const char*`s are given to us by compiler, from the text area and thus we do not have to manage their lifetimes. We also never want to change them. Also moved copy constructor to compiler-generated methods, not sure why it wasn't -- even before it was the same as a compiler would generate.
This commit is contained in:
@@ -102,8 +102,8 @@ namespace Catch {
|
||||
|
||||
SourceLineInfo();
|
||||
SourceLineInfo( char const* _file, std::size_t _line );
|
||||
SourceLineInfo( SourceLineInfo const& other );
|
||||
# ifdef CATCH_CONFIG_CPP11_GENERATED_METHODS
|
||||
SourceLineInfo(SourceLineInfo const& other) = default;
|
||||
SourceLineInfo( SourceLineInfo && ) = default;
|
||||
SourceLineInfo& operator = ( SourceLineInfo const& ) = default;
|
||||
SourceLineInfo& operator = ( SourceLineInfo && ) = default;
|
||||
@@ -112,7 +112,7 @@ namespace Catch {
|
||||
bool operator == ( SourceLineInfo const& other ) const;
|
||||
bool operator < ( SourceLineInfo const& other ) const;
|
||||
|
||||
std::string file;
|
||||
char const* file;
|
||||
std::size_t line;
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user