code style
This commit is contained in:
@@ -16,12 +16,13 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef LIBUTILS_ROTATEFILE_H_
|
||||
#define LIBUTILS_ROTATEFILE_H_
|
||||
#ifndef LIB_UTILS_ROTATEFILE_H_
|
||||
#define LIB_UTILS_ROTATEFILE_H_
|
||||
|
||||
#include <unistd.h>
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
#include <string>
|
||||
|
||||
/** @file rotatefile.h
|
||||
* Helpers for writing to rotating files.
|
||||
@@ -41,7 +42,7 @@ public:
|
||||
* @param maxSize the maximum size of the file to write to.
|
||||
* @param textMode whether to write each byte with prefixed timestamp and direction as text.
|
||||
*/
|
||||
RotateFile(const string fileName, const unsigned long maxSize, const bool textMode=false)
|
||||
RotateFile(const string fileName, const unsigned long maxSize, const bool textMode = false)
|
||||
: m_enabled(false), m_fileName(fileName), m_maxSize(maxSize), m_textMode(textMode), m_stream(), m_fileSize(0) {}
|
||||
|
||||
/**
|
||||
@@ -54,7 +55,7 @@ public:
|
||||
* @param enabled @p true to enable writing to the file, @p false to disable it.
|
||||
* @return @p true when the state was changed, @p false otherwise.
|
||||
*/
|
||||
bool setEnabled(bool enabled=true);
|
||||
bool setEnabled(bool enabled = true);
|
||||
|
||||
/**
|
||||
* Return whether writing to the file is enabled.
|
||||
@@ -68,7 +69,7 @@ public:
|
||||
* @param size the number of bytes to write.
|
||||
* @param received @a true on reception, @a false on sending (only relevant in text mode).
|
||||
*/
|
||||
void write(unsigned char* value, unsigned int size, bool received=true);
|
||||
void write(unsigned char* value, unsigned int size, bool received = true);
|
||||
|
||||
private:
|
||||
/** whether writing to the file is enabled. */
|
||||
@@ -91,5 +92,5 @@ private:
|
||||
|
||||
};
|
||||
|
||||
#endif // LIBUTILS_ROTATEFILE_H_
|
||||
#endif // LIB_UTILS_ROTATEFILE_H_
|
||||
|
||||
|
||||
Reference in New Issue
Block a user