提交 91660e04 编写于 作者: A Abhishek Kona

[Rocksdb] codemod NULL to nullptr in tools/*.cc

Summary: simple sed command to replace NULL in tools directory. Was missed by the previous codemod.

Test Plan: it compiles

Reviewers: emayanke

Reviewed By: emayanke

CC: leveldb

Differential Revision: https://reviews.facebook.net/D9621
上级 d0798f67
......@@ -67,7 +67,7 @@ public:
}
LDBCommand* cmdObj = LDBCommand::InitFromCmdLineArgs(argc, argv);
if (cmdObj == NULL) {
if (cmdObj == nullptr) {
fprintf(stderr, "Unknown command\n");
PrintHelp(argv[0]);
exit(1);
......
......@@ -18,7 +18,7 @@ public:
ReduceLevelTest() {
dbname_ = test::TmpDir() + "/db_reduce_levels_test";
DestroyDB(dbname_, Options());
db_ = NULL;
db_ = nullptr;
}
Status OpenDB(bool create_if_missing, int levels,
......@@ -41,7 +41,7 @@ public:
}
Status CompactMemTable() {
if (db_ == NULL) {
if (db_ == nullptr) {
return Status::InvalidArgument("DB not opened.");
}
DBImpl* db_impl = reinterpret_cast<DBImpl*>(db_);
......@@ -49,9 +49,9 @@ public:
}
void CloseDB() {
if (db_ != NULL) {
if (db_ != nullptr) {
delete db_;
db_ = NULL;
db_ = nullptr;
}
}
......
......@@ -22,7 +22,7 @@ namespace leveldb {
class SstFileReader {
public:
SstFileReader(std::string file_name,
explicit SstFileReader(std::string file_name,
bool verify_checksum = false,
bool output_hex = false);
Status ReadSequential(bool print_kv, uint64_t read_num = -1);
......@@ -95,7 +95,7 @@ static void print_help() {
int main(int argc, char** argv) {
const char* dir_or_file = NULL;
const char* dir_or_file = nullptr;
uint64_t read_num = -1;
std::string command;
......@@ -121,7 +121,7 @@ int main(int argc, char** argv) {
}
}
if(dir_or_file == NULL) {
if(dir_or_file == nullptr) {
print_help();
exit(1);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册