diff --git a/include/RouterNode.h b/include/RouterNode.h index 935207fa7c85c37f5991fcbe82db88892cb8be57..f0b177a689df8f8b10e8cbf6cb59fb3565befffa 100644 --- a/include/RouterNode.h +++ b/include/RouterNode.h @@ -11,7 +11,7 @@ class RouterSimulator; class RouterNode { public: RouterNode(const RouterNode&) = delete; - // std::vector requires RouterNode to be move-constructible + // std::vector<RouterNode> in RouterSimulator.h requires move constructor RouterNode(RouterNode&&) = default; RouterNode& operator=(const RouterNode&) = delete; RouterNode& operator=(RouterNode&&) = delete; diff --git a/src/GuiTextArea.cpp b/src/GuiTextArea.cpp index 6d1a2706aab3439a5710f53e009311eb2bc6818e..13f8942175e2e0f6b4629753a1e3bbaeed5df2eb 100644 --- a/src/GuiTextArea.cpp +++ b/src/GuiTextArea.cpp @@ -17,7 +17,7 @@ GuiTextArea::GuiTextArea(string const& title) textedit->setFont(font); textedit->setReadOnly(true); myGUI->setCentralWidget(textedit); - myGUI->setFixedSize(600, 600); + myGUI->setMinimumSize(600, 600); myGUI->setWindowTitle(QString::fromStdString(title)); myGUI->show(); } diff --git a/src/RouterSimulator.cpp b/src/RouterSimulator.cpp index 724cc998ad91ae0542301a30210c412ba8701d75..b7b6596481d3e04a9703def4ea31230f65521b3d 100644 --- a/src/RouterSimulator.cpp +++ b/src/RouterSimulator.cpp @@ -26,8 +26,9 @@ * This version strives to stay as close as possible to the original Java and * Python code with a few differences: * - Windowing system is initialized in RouterSimulator::main - * - Events and packets need to be `delete`d from the heap since C++ does not - * have garbage collection. + * - Events and packets are `delete`d from the heap in + * RouterSimulator::runSimulation since C++ does not have garbage + * collection. * - Long option "--poison" is now called "--poisonreverse" * * Entry point: RouterSimulator::main(argc, argv) @@ -361,8 +362,7 @@ void RouterSimulator::toLayer2(RouterPacket& packet) { } void RouterSimulator::initialize(int argc, char* argv[]) { - string inputInfo = "./RouterSimulator " - "-c, --change <LINKCHANGE (bool)> " + string inputInfo = "-c, --change <LINKCHANGE (bool)> " "-n, --nodes <NODES (int)> " "-p, --poisonreverse <POISONREVERSE (bool)> " "-s, --seed <SEED (long)> " @@ -415,13 +415,13 @@ void RouterSimulator::initialize(int argc, char* argv[]) { RouterSimulator::TRACE = stoi(optarg); } break; default: { - cerr << inputInfo; + cerr << argv[0] << inputInfo; exit(EXIT_FAILURE); } break; } } } catch (invalid_argument&) { - cerr << inputInfo << endl; + cerr << argv[0] << inputInfo << endl; exit(2); } }