diff --git a/Analyser/Static/StaticAnalyser.hpp b/Analyser/Static/StaticAnalyser.hpp index 63b9e8867..05aedfa64 100644 --- a/Analyser/Static/StaticAnalyser.hpp +++ b/Analyser/Static/StaticAnalyser.hpp @@ -38,12 +38,15 @@ struct Media { } Media &operator +=(const Media &rhs) { -#define append(name) name.insert(name.end(), rhs.name.begin(), rhs.name.end()); - append(disks); - append(tapes); - append(cartridges); - append(mass_storage_devices); -#undef append + const auto append = [&](auto &destination, auto &source) { + destination.insert(destination.end(), source.begin(), source.end()); + }; + + append(disks, rhs.disks); + append(tapes, rhs.tapes); + append(cartridges, rhs.cartridges); + append(mass_storage_devices, rhs.mass_storage_devices); + return *this; } };