Skip to content

Commit beeb561

Browse files
committed
Clear deprecated-copy warning from C++ class.
Getting a -Wdeprecated-copy trigger from ap210e3's use of SDAI_BOOLEAN - make an explicit assignment operator.
1 parent ec35904 commit beeb561

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

src/cldai/sdaiEnum.cc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,12 @@ SDAI_BOOLEAN &SDAI_BOOLEAN::operator= (const SDAI_LOGICAL &t)
339339
return *this;
340340
}
341341

342+
SDAI_BOOLEAN &SDAI_BOOLEAN::operator= (const SDAI_BOOLEAN &t)
343+
{
344+
v = t;
345+
return *this;
346+
}
347+
342348
SDAI_BOOLEAN &SDAI_BOOLEAN::operator= (const Boolean t)
343349
{
344350
v = t;

src/cldai/sdaiEnum.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@ class SC_DAI_EXPORT SDAI_BOOLEAN :
146146

147147
operator ::Boolean() const;
148148
SDAI_BOOLEAN &operator=(const SDAI_LOGICAL &t);
149+
SDAI_BOOLEAN &operator=(const SDAI_BOOLEAN &t);
149150

150151
SDAI_BOOLEAN &operator=(const ::Boolean t);
151152
SDAI_LOGICAL operator==(const SDAI_LOGICAL &t) const;

0 commit comments

Comments
 (0)