From ab4d73fba3bd5205f02f07c4702d1d74aff273c0 Mon Sep 17 00:00:00 2001 From: december0123 <december0123@gmail.com> Date: Wed, 24 Sep 2014 16:06:17 +0200 Subject: [PATCH] Remove useless code --- src/Printer.cpp | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/src/Printer.cpp b/src/Printer.cpp index de75619..bb2d41d 100644 --- a/src/Printer.cpp +++ b/src/Printer.cpp @@ -241,24 +241,14 @@ void Printer::printConfigDetails(const Config& config) const conflicts += conflict + " "; } - if (dependencies.empty()) - { - dependencies = "-"; - } - - if (conflicts.empty()) - { - conflicts = "-"; - } - std::cout << " NAME:\t" << config.name_ << "\n ATTACHED:\t" << config.type_ << "\n VERSION:\t" << config.version_ << "\n INFO:\t" << (config.info_.empty() ? "-" : config.info_) << "\n PRIORITY:\t" << config.priority_ << "\n FREEDRIVER:\t" << std::boolalpha << config.freedriver_ - << "\n DEPENDS:\t" << dependencies - << "\n CONFLICTS:\t" << conflicts + << "\n DEPENDS:\t" << (dependencies.empty() ? "-" : dependencies) + << "\n CONFLICTS:\t" << (conflicts.empty() ? "-" : conflicts) << "\n CLASSIDS:\t" << classids << "\n VENDORIDS:\t" << vendorids << std::endl; } -- GitLab