Closed SMorettini closed 1 year ago
The generation of the equal operator of .cpp for the following fpp
.cpp
struct Modules4 { arr1: [3] M.Modules2 arr2: [6] M.Modules2 }
is
bool Modules4 :: operator==(const Modules4& obj) const { // Compare non-array members if (!( )) { return false; } // Compare array members ...
The first if is empty and doesn't compile.
I change the fpp-to-cpp to generate correct code also if there are no non-array members.
I apply the formatting changes suggested
Problem
The generation of the equal operator of
.cpp
for the following fppis
The first if is empty and doesn't compile.
Solution
I change the fpp-to-cpp to generate correct code also if there are no non-array members.
Note: it's my first time working with Scala, let me know if I should make the change using a different approach