forked from TartanLlama/expected
Fix warnings in test (#92)
* Convert tabs to spaces * Remove extra semicolons in test * Fix warnings in test -Wreturn-type -Wunused-parameter -Wunused-value * Fix -Wunused-variable warning in test The variable 'failptr' is unused. From looking at the other variables in the test case, it seems the fix is to first remove 'failptr' and then rename 'efail' to 'failptr'. * Fix -Wunused-variable warning in test * Fix -Wmacro-redefined warning in test STATIC_REQUIRE has a previous definition in catch2/catch.hpp.
This commit is contained in:
@@ -825,7 +825,7 @@ struct expected_operations_base : expected_storage_base<T, E> {
|
||||
if (rhs.m_has_val) {
|
||||
get() = std::forward<Rhs>(rhs).get();
|
||||
} else {
|
||||
destroy_val();
|
||||
destroy_val();
|
||||
construct_error(std::forward<Rhs>(rhs).geterr());
|
||||
}
|
||||
} else {
|
||||
@@ -858,7 +858,7 @@ struct expected_operations_base : expected_storage_base<T, E> {
|
||||
#endif
|
||||
|
||||
TL_EXPECTED_11_CONSTEXPR void destroy_val() {
|
||||
get().~T();
|
||||
get().~T();
|
||||
}
|
||||
};
|
||||
|
||||
@@ -913,7 +913,7 @@ struct expected_operations_base<void, E> : expected_storage_base<void, E> {
|
||||
#endif
|
||||
|
||||
TL_EXPECTED_11_CONSTEXPR void destroy_val() {
|
||||
//no-op
|
||||
//no-op
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user