Closed zwets closed 3 years ago
Reading a bit further down, the same goes for the GFAKluge()
constructor. It initialises a bunch of local variables (shadowing the class members), but does nothing else. It can be removed without effects. (Did not add this to this patch though.)
Ah, yep, that's strange. I think I wrote these constructors on a train so not terribly surprising. Thanks @zwets !
Hi Eric, just going through the code I noticed the odd
path_elem()
constructor ingfakluge.hpp
.It looks like its intent was to initialise the struct members, but this isn't what it does. Instead it effectively creates five local objects that go out of scope right away, while doing no initialisation.
Since the struct needs no initialisation, this constructor can go away without harm - and with the benefit of faster default construction.