From c17e413b305c29f64fdaa348d070478414a208a6 Mon Sep 17 00:00:00 2001 From: Jeff Donahue Date: Thu, 12 Jun 2014 22:29:59 -0700 Subject: [PATCH] lint --- src/caffe/layers/data_layer.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/caffe/layers/data_layer.cpp b/src/caffe/layers/data_layer.cpp index 3b307ec..f12ae1c 100644 --- a/src/caffe/layers/data_layer.cpp +++ b/src/caffe/layers/data_layer.cpp @@ -156,7 +156,7 @@ DataLayer::~DataLayer() { // clean up the database resources switch (this->layer_param_.data_param().backend()) { case DataParameter_DB_LEVELDB: - break; // do nothing + break; // do nothing case DataParameter_DB_LMDB: mdb_cursor_close(mdb_cursor_); mdb_close(mdb_env_, mdb_dbi_); @@ -198,10 +198,10 @@ void DataLayer::SetUp(const vector*>& bottom, break; case DataParameter_DB_LMDB: CHECK_EQ(mdb_env_create(&mdb_env_), MDB_SUCCESS) << "mdb_env_create failed"; - CHECK_EQ(mdb_env_set_mapsize(mdb_env_, 1099511627776), MDB_SUCCESS); // 1TB + CHECK_EQ(mdb_env_set_mapsize(mdb_env_, 1099511627776), MDB_SUCCESS); // 1TB CHECK_EQ(mdb_env_open(mdb_env_, - this->layer_param_.data_param().source().c_str(), - MDB_RDONLY|MDB_NOTLS, 0664), MDB_SUCCESS) << "mdb_env_open failed"; + this->layer_param_.data_param().source().c_str(), + MDB_RDONLY|MDB_NOTLS, 0664), MDB_SUCCESS) << "mdb_env_open failed"; CHECK_EQ(mdb_txn_begin(mdb_env_, NULL, MDB_RDONLY, &mdb_txn_), MDB_SUCCESS) << "mdb_txn_begin failed"; CHECK_EQ(mdb_open(mdb_txn_, NULL, 0, &mdb_dbi_), MDB_SUCCESS) @@ -230,10 +230,10 @@ void DataLayer::SetUp(const vector*>& bottom, } break; case DataParameter_DB_LMDB: - if(mdb_cursor_get(mdb_cursor_, &mdb_key_, &mdb_value_, MDB_NEXT) + if (mdb_cursor_get(mdb_cursor_, &mdb_key_, &mdb_value_, MDB_NEXT) != MDB_SUCCESS) { CHECK_EQ(mdb_cursor_get(mdb_cursor_, &mdb_key_, &mdb_value_, - MDB_FIRST), MDB_SUCCESS); + MDB_FIRST), MDB_SUCCESS); } break; default: -- 2.7.4