Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/include/internal/catch_common.cpp
diff options
context:
space:
mode:
authorPhil Nash2017-07-13 08:25:47 +0100
committerPhil Nash2017-07-13 08:25:47 +0100
commite01ed48a70925a6b18f70882f0065a42a560782b (patch)
tree4db61e3c814a78b15346dac42054f2ff3e86df89 /include/internal/catch_common.cpp
parent989222eceb34f749cd547d4d419ec2f7ac948a70 (diff)
downloadcatch3-e01ed48a70925a6b18f70882f0065a42a560782b.tar.gz
Made everything used in test case registration noexcept
- this prevents warnings about startup-time exceptions
Diffstat (limited to 'include/internal/catch_common.cpp')
-rw-r--r--include/internal/catch_common.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/include/internal/catch_common.cpp b/include/internal/catch_common.cpp
index 6cd1b46d..a35ef93a 100644
--- a/include/internal/catch_common.cpp
+++ b/include/internal/catch_common.cpp
@@ -75,18 +75,18 @@ namespace Catch {
return os;
}
- SourceLineInfo::SourceLineInfo() : file(""), line( 0 ){}
- SourceLineInfo::SourceLineInfo( char const* _file, std::size_t _line )
+ SourceLineInfo::SourceLineInfo() noexcept : file(""), line( 0 ){}
+ SourceLineInfo::SourceLineInfo( char const* _file, std::size_t _line ) noexcept
: file( _file ),
line( _line )
{}
- bool SourceLineInfo::empty() const {
+ bool SourceLineInfo::empty() const noexcept {
return file[0] == '\0';
}
- bool SourceLineInfo::operator == ( SourceLineInfo const& other ) const {
+ bool SourceLineInfo::operator == ( SourceLineInfo const& other ) const noexcept {
return line == other.line && (file == other.file || std::strcmp(file, other.file) == 0);
}
- bool SourceLineInfo::operator < ( SourceLineInfo const& other ) const {
+ bool SourceLineInfo::operator < ( SourceLineInfo const& other ) const noexcept {
return line < other.line || ( line == other.line && (std::strcmp(file, other.file) < 0));
}