Skip to content

Commit

Permalink
tidy up
Browse files Browse the repository at this point in the history
  • Loading branch information
davidkyle committed Feb 24, 2021
1 parent ec8b883 commit afbb3ba
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
3 changes: 0 additions & 3 deletions bin/pytorch_inference/CBufferedIStreamAdapter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@ CBufferedIStreamAdapter::CBufferedIStreamAdapter(std::istream& inputStream)
: m_InputStream(inputStream) {
}

CBufferedIStreamAdapter::~CBufferedIStreamAdapter() {
}

bool CBufferedIStreamAdapter::init() {
if (parseSizeFromStream(m_Size) == false) {
LOG_ERROR(<< "Failed to read model size");
Expand Down
1 change: 0 additions & 1 deletion bin/pytorch_inference/CBufferedIStreamAdapter.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ namespace torch {
class CBufferedIStreamAdapter : public caffe2::serialize::ReadAdapterInterface {
public:
CBufferedIStreamAdapter(std::istream& inputStream);
~CBufferedIStreamAdapter() override;

//! True if the model is successfully read.
//! Must be called before read or size
Expand Down
7 changes: 4 additions & 3 deletions bin/pytorch_inference/CCommandParser.cc
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ bool CCommandParser::ioLoop(const TRequestHandlerFunc& requestHandler) const {
debug(doc);
CCommandParser::SRequest request = jsonToRequest(doc);
if (requestHandler(request) == false) {
LOG_ERROR(<< "Request handler forced exit");
return false;
LOG_ERROR(<< "Request handler forced exit");
return false;
}
}

Expand Down Expand Up @@ -94,7 +94,8 @@ bool CCommandParser::validateJson(const rapidjson::Document& doc) const {
while (doc.HasMember(varArgName)) {
const rapidjson::Value& value = doc[varArgName];
if (value.IsArray() == false) {
LOG_ERROR(<< "Invalid command: argument [" << varArgName << "] is not an array");
LOG_ERROR(<< "Invalid command: argument [" << varArgName
<< "] is not an array");
return false;
}

Expand Down

0 comments on commit afbb3ba

Please sign in to comment.