Commit fa13937a authored by LEFEBVREJP email's avatar LEFEBVREJP email
Browse files

Fixing several cppcheck warnings.

parent 084ca1de
Pipeline #7409 passed with stages
in 23 minutes and 7 seconds
......@@ -18,11 +18,21 @@ namespace radix
/**
* Constructor
*/
eafstream::eafstream(const char * path) : std::ifstream(path), mReverseBytes(false)
eafstream::eafstream(const char * path)
: std::ifstream(path)
, mReverseBytes(false)
, mBytesRead(0)
, mHeader(0)
, mFooter(0)
{
}//constructor
eafstream::eafstream(const char * path, ios_base::openmode mode) : std::ifstream(path, mode), mReverseBytes(false)
eafstream::eafstream(const char * path, ios_base::openmode mode)
: std::ifstream(path, mode)
, mReverseBytes(false)
, mBytesRead(0)
, mHeader(0)
, mFooter(0)
{
}//constructor
......@@ -243,7 +253,7 @@ int* eafstream::readIntArray(int size)
{
array = new int[size];
}
catch (std::bad_alloc xa)
catch (std::bad_alloc& xa)
{
std::cerr << "Memory allocation failure reading array of integers. Line:" << __LINE__ << std::endl;
exit(1);
......@@ -277,7 +287,7 @@ float* eafstream::readFloatArray(int size)
{
array = new float[size];
}
catch (std::bad_alloc xa)
catch (std::bad_alloc& xa)
{
std::cerr << "Memory allocation failure reading array of integers. Line:" << __LINE__ << std::endl;
exit(1);
......@@ -309,7 +319,7 @@ double* eafstream::readDoubleArray(int size)
{
array = new double[size];
}
catch (std::bad_alloc xa)
catch (std::bad_alloc& xa)
{
std::cerr << "Memory allocation failure reading array of doubles. Line:" << __LINE__ << std::endl;
exit(1);
......
......@@ -26,7 +26,7 @@ public:
* @brief ThreadPool constructs ThreadPool with some number of threads
* @param numThreads size_t number of threads
*/
ThreadPool(size_t numThreads);
explicit ThreadPool(size_t numThreads);
~ThreadPool();
template<class FunctionType, class... ArgumentList>
......
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