Commit 55bc6543 authored by Millian Poquet's avatar Millian Poquet
Browse files

[code] codacy: explicit constructors

parent 93cff1c6
......@@ -122,7 +122,7 @@ public:
* @brief Builds a PajeTracer
* @param[in] log_launchings If set to true, job launching time will be written in the trace. This option leads to larger trace files
*/
PajeTracer(bool log_launchings = false);
explicit PajeTracer(bool log_launchings = false);
/**
* @brief Sets the filename of a PajeTracer
......
......@@ -43,7 +43,7 @@ struct Machine
* @brief Constructs a Machine
* @param[in] machines The Machines instances the Machine is within
*/
Machine(Machines * machines);
explicit Machine(Machines * machines);
/**
* @brief Destroys a Machine
......
......@@ -24,7 +24,7 @@ public:
* @brief Constructor
* @param[in,out] os The output stream
*/
Writer(OutputStream& os) : rapidjson::Writer<OutputStream>(os), os_(&os)
explicit Writer(OutputStream& os) : rapidjson::Writer<OutputStream>(os), os_(&os)
{
}
......@@ -45,7 +45,9 @@ public:
RAPIDJSON_ASSERT(ret < buf_size - 1);
for (int i = 0; i < ret; ++i)
{
os_->Put(buffer[i]);
}
delete[] buffer;
return ret < (buf_size - 1);
......@@ -169,7 +171,7 @@ public:
* @brief Creates an empty JsonProtocolWriter
* @param[in,out] context The BatsimContext
*/
JsonProtocolWriter(BatsimContext * context);
explicit JsonProtocolWriter(BatsimContext * context);
/**
* @brief Destroys a JsonProtocolWriter
......@@ -308,7 +310,7 @@ public:
* @brief Constructor
* @param[in] context The BatsimContext
*/
JsonProtocolReader(BatsimContext * context);
explicit JsonProtocolReader(BatsimContext * context);
/**
* @brief Destructor
......
......@@ -24,7 +24,7 @@ public:
* @brief Builds an empty Workload
* @param[in] workload_name The workload name
*/
Workload(const std::string & workload_name);
explicit Workload(const std::string & workload_name);
/**
* @brief Destroys a Workload
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment