mirror of
https://github.com/catchorg/Catch2.git
synced 2025-06-01 09:27:54 +00: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:
parent
02a69b449f
commit
60f8ebec49
2 changed files with 8 additions and 10 deletions
|
@ -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;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue