@@ -66,11 +66,7 @@ InputA::InputA(InputA&& other) noexcept
6666
6767InputA& InputA::operator =(const InputA& other)
6868{
69- InputA value { other };
70-
71- std::swap (*this , value);
72-
73- return *this ;
69+ return *this = InputA { other };
7470}
7571
7672InputA& InputA::operator =(InputA&& other) noexcept
@@ -98,11 +94,7 @@ InputB::InputB(InputB&& other) noexcept
9894
9995InputB& InputB::operator =(const InputB& other)
10096{
101- InputB value { other };
102-
103- std::swap (*this , value);
104-
105- return *this ;
97+ return *this = InputB { other };
10698}
10799
108100InputB& InputB::operator =(InputB&& other) noexcept
@@ -116,11 +108,13 @@ InputABCD::InputABCD(
116108 std::string dArg,
117109 InputA aArg,
118110 InputB bArg,
119- std::vector<InputBC> bcArg) noexcept
111+ std::vector<InputBC> bcArg,
112+ int valueArg) noexcept
120113 : d { std::move (dArg) }
121114 , a { std::move (aArg) }
122115 , b { std::move (bArg) }
123116 , bc { std::move (bcArg) }
117+ , value { std::move (valueArg) }
124118{
125119}
126120
@@ -129,6 +123,7 @@ InputABCD::InputABCD(const InputABCD& other)
129123 , a { ModifiedVariable<InputA>::duplicate (other.a ) }
130124 , b { ModifiedVariable<InputB>::duplicate (other.b ) }
131125 , bc { ModifiedVariable<InputBC>::duplicate<TypeModifier::List>(other.bc ) }
126+ , value { ModifiedVariable<int >::duplicate (other.value ) }
132127{
133128}
134129
@@ -137,16 +132,13 @@ InputABCD::InputABCD(InputABCD&& other) noexcept
137132 , a { std::move (other.a ) }
138133 , b { std::move (other.b ) }
139134 , bc { std::move (other.bc ) }
135+ , value { std::move (other.value ) }
140136{
141137}
142138
143139InputABCD& InputABCD::operator =(const InputABCD& other)
144140{
145- InputABCD value { other };
146-
147- std::swap (*this , value);
148-
149- return *this ;
141+ return *this = InputABCD { other };
150142}
151143
152144InputABCD& InputABCD::operator =(InputABCD&& other) noexcept
@@ -155,6 +147,7 @@ InputABCD& InputABCD::operator=(InputABCD&& other) noexcept
155147 a = std::move (other.a );
156148 b = std::move (other.b );
157149 bc = std::move (other.bc );
150+ value = std::move (other.value );
158151
159152 return *this ;
160153}
@@ -181,11 +174,7 @@ InputBC::InputBC(InputBC&& other) noexcept
181174
182175InputBC& InputBC::operator =(const InputBC& other)
183176{
184- InputBC value { other };
185-
186- std::swap (*this , value);
187-
188- return *this ;
177+ return *this = InputBC { other };
189178}
190179
191180InputBC& InputBC::operator =(InputBC&& other) noexcept
@@ -229,6 +218,7 @@ response::Value Variable<InputABCD>::serialize(InputABCD&& inputValue)
229218 result.emplace_back (R"js( a)js" s, ModifiedVariable<InputA>::serialize (std::move (inputValue.a )));
230219 result.emplace_back (R"js( b)js" s, ModifiedVariable<InputB>::serialize (std::move (inputValue.b )));
231220 result.emplace_back (R"js( bc)js" s, ModifiedVariable<InputBC>::serialize<TypeModifier::List>(std::move (inputValue.bc )));
221+ result.emplace_back (R"js( value)js" s, ModifiedVariable<int >::serialize (std::move (inputValue.value )));
232222
233223 return result;
234224}
0 commit comments