-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Undo some unnecessary changes; Minor refactoring.
- Loading branch information
1 parent
fc65297
commit 772fc56
Showing
5 changed files
with
17 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
#include "LogSurgeonReader.hpp" | ||
|
||
LogSurgeonReader::LogSurgeonReader (ReaderInterface& reader_interface) | ||
LogSurgeonReader::LogSurgeonReader(ReaderInterface& reader_interface) | ||
: m_reader_interface(reader_interface) { | ||
read = [this] (char* buf, size_t count, size_t& read_to) -> log_surgeon::ErrorCode { | ||
read = [this](char* buf, size_t count, size_t& read_to) -> log_surgeon::ErrorCode { | ||
m_reader_interface.read(buf, count, read_to); | ||
if (read_to == 0) { | ||
return log_surgeon::ErrorCode::EndOfFile; | ||
} | ||
return log_surgeon::ErrorCode::Success; | ||
}; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,19 @@ | ||
#ifndef LOG_SURGEON_READER_HPP | ||
#define LOG_SURGEON_READER_HPP | ||
|
||
#include <log_surgeon/Reader.hpp> | ||
|
||
#include "ReaderInterface.hpp" | ||
|
||
/* | ||
* Wrapper providing a read function that works with the parsers in log_surgeon. | ||
*/ | ||
class LogSurgeonReader : public log_surgeon::Reader { | ||
public: | ||
LogSurgeonReader (ReaderInterface& reader_interface); | ||
LogSurgeonReader(ReaderInterface& reader_interface); | ||
|
||
private: | ||
ReaderInterface& m_reader_interface; | ||
}; | ||
|
||
#endif //LOG_SURGEON_READER_HPP | ||
#endif // LOG_SURGEON_READER_HPP |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters