Mir

Code review comment for lp:~josharenson/mir/command_line_config

Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

78 +#include "mir/default_configuration.h"

Not used

~~~~

126 +#include "mir_test_framework/command_line_server_configuration.h"
127 #include "mir_test_framework/stubbed_server_configuration.h"

The first header should be the one that corresponds to the .cpp (which proves the header is self-contained)

~~~~

96 + using namespace std;

Just use std::make_shared a few lines later.

~~~~

97 + auto configuration_from_commandline()
98 + -> shared_ptr<mo::DefaultConfiguration>
99 + {
100 + return make_shared<mo::DefaultConfiguration>(::argc, ::argv);
101 + }
...
107 + std::cout << "Running main() from " << basename(__FILE__) << std::endl;
108 + ::argc = std::remove_if(
109 + argv,
110 + argv+argc,
111 + [](char const* arg) { return !strncmp(arg, "--gtest_", 8); }) - argv;
112 + ::argv = const_cast<char const**>(argv);
113 +
114 + ::testing::InitGoogleTest(&argc, argv);
115 +
116 + return RUN_ALL_TESTS();

We don't use tabs on this codebase.

~~~~

review: Needs Fixing

« Back to merge proposal