[gcc r15-8938] libgcobol: Simplify assignment operator by defaulting it
James K. Lowden
jklowden@gcc.gnu.org
Wed Mar 26 20:49:52 GMT 2025
https://gcc.gnu.org/g:b1a58dcb238c5a48e24f226c89287595ef7a9225
commit r15-8938-gb1a58dcb238c5a48e24f226c89287595ef7a9225
Author: Jonathan Wakely <jwakely@redhat.com>
Date: Tue Mar 18 21:16:46 2025 +0000
libgcobol: Simplify assignment operator by defaulting it
libgcobol/ChangeLog:
* common-defs.h (cbl_enabled_exceptions_t::operator=): Define as
defaulted.
Diff:
---
libgcobol/common-defs.h | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/libgcobol/common-defs.h b/libgcobol/common-defs.h
index d052f58b6dff..d2138770470a 100644
--- a/libgcobol/common-defs.h
+++ b/libgcobol/common-defs.h
@@ -444,11 +444,7 @@ class cbl_enabled_exceptions_t : protected std::set<cbl_enabled_exception_t>
bool empty() const { return std::set<cbl_enabled_exception_t>::empty(); }
size_t size() const { return std::set<cbl_enabled_exception_t>::size(); }
- cbl_enabled_exceptions_t& operator=( const cbl_enabled_exceptions_t& that ) {
- std::set<cbl_enabled_exception_t>& self(*this);
- self = that;
- return *this;
- }
+ cbl_enabled_exceptions_t& operator=( const cbl_enabled_exceptions_t& ) = default;
};
extern cbl_enabled_exceptions_t enabled_exceptions;
More information about the Gcc-cvs
mailing list