FairMQ: fix const qualifier for DeviceRunner

This commit is contained in:
Alexey Rybalchenko 2017-10-04 16:08:58 +02:00 committed by Mohammad Al-Turany
parent 1bc5771bf3
commit d175a732a6
5 changed files with 7 additions and 5 deletions

View File

@ -12,7 +12,7 @@
using namespace fair::mq; using namespace fair::mq;
DeviceRunner::DeviceRunner(int argc, char const* argv[]) DeviceRunner::DeviceRunner(int argc, char* const argv[])
: fRawCmdLineArgs{tools::ToStrVector(argc, argv, false)} : fRawCmdLineArgs{tools::ToStrVector(argc, argv, false)}
, fPluginManager{PluginManager::MakeFromCommandLineOptions(fRawCmdLineArgs)} , fPluginManager{PluginManager::MakeFromCommandLineOptions(fRawCmdLineArgs)}
, fDevice{nullptr} , fDevice{nullptr}

View File

@ -51,7 +51,7 @@ namespace mq
class DeviceRunner class DeviceRunner
{ {
public: public:
DeviceRunner(int argc, char const* argv[]); DeviceRunner(int argc, char* const argv[]);
auto Run() -> int; auto Run() -> int;
auto RunWithExceptionHandlers() -> int; auto RunWithExceptionHandlers() -> int;

View File

@ -38,7 +38,7 @@ FairMQDevicePtr getDevice(const FairMQProgOptions& config);
// to be implemented by the user to add custom command line options (or just with empty body) // to be implemented by the user to add custom command line options (or just with empty body)
void addCustomOptions(boost::program_options::options_description&); void addCustomOptions(boost::program_options::options_description&);
int main(int argc, const char** argv) int main(int argc, char* argv[])
{ {
using namespace fair::mq; using namespace fair::mq;
using namespace fair::mq::hooks; using namespace fair::mq::hooks;

View File

@ -33,7 +33,7 @@ auto ToString(T&&... t) -> std::string
} }
/// @brief convert command line arguments from main function to vector of strings /// @brief convert command line arguments from main function to vector of strings
inline auto ToStrVector(const int argc, const char* argv[], const bool dropProgramName = true) -> std::vector<std::string> inline auto ToStrVector(const int argc, char* const argv[], const bool dropProgramName = true) -> std::vector<std::string>
{ {
auto res = std::vector<std::string>{}; auto res = std::vector<std::string>{};
if (dropProgramName) if (dropProgramName)

View File

@ -37,7 +37,9 @@ int runStateMachine(TMQDevice& device, FairMQProgOptions& cfg)
if (control == "interactive") if (control == "interactive")
{ {
device.InteractiveStateLoop(); LOG(ERROR) << "interactive control moved to plugin";
return 1;
// device.InteractiveStateLoop();
} }
else if (control == "static") else if (control == "static")
{ {