I know that some people belive that goto's are devil's work
but sometimes (like chaining if/elses for failures) it can
actually simplify the code for a better readability and
improved speed.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Strings can be expensive to create, all the issues with allocation,
copy of the char members, conversion to UTF-16. QStringLiteral creates
one in compile time.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
virtual marks a method for inclusion on a v-table, but we don't want
the methods of classes that won't be inheritable to have a v-table,
we want, however, to issue a warning if somebody try to inherit
that specific class and reimplement those methods.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Fact* espVersion = getFact(FactSystem::ParameterProvider, MAV_COMP_ID_UDP_BRIDGE, "SW_VER"); crashes unit test if the parameter does not exist (which is exactly what the call is trying to establish).
Also, added a missing method on AutoPilotPlugin as a public
pure virtual method (the inheritances already implemented it as a
slot, so the new Signal syntax didn't worked because the base class
didn't had that method)
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
First commit of modernizarion of Qt signal connections,
the new signal connection is very userfull because of a few
nice things:
- it's checked at compile time instead of runtime
- it can connect to any function or method, so we don't need
to use slots anymore
- it's way faster because it doesn't need to work with string
comparisson, but it's basically a direct call.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>