Remove extern from function declarations.

External linkage is the default for function declarations in C++.

This also fixes ClangTidy errors generated by removing the "extern"
keyword as described above.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=188730416
This commit is contained in:
costan
2018-03-12 09:14:44 -07:00
committed by Victor Costan
parent ddab751002
commit aece2068d7
20 changed files with 103 additions and 110 deletions

View File

@@ -12,31 +12,31 @@
namespace leveldb {
// A utility routine: write "data" to the named file and Sync() it.
extern Status WriteStringToFileSync(Env* env, const Slice& data,
const std::string& fname);
Status WriteStringToFileSync(Env* env, const Slice& data,
const std::string& fname);
static std::string MakeFileName(const std::string& name, uint64_t number,
static std::string MakeFileName(const std::string& dbname, uint64_t number,
const char* suffix) {
char buf[100];
snprintf(buf, sizeof(buf), "/%06llu.%s",
static_cast<unsigned long long>(number),
suffix);
return name + buf;
return dbname + buf;
}
std::string LogFileName(const std::string& name, uint64_t number) {
std::string LogFileName(const std::string& dbname, uint64_t number) {
assert(number > 0);
return MakeFileName(name, number, "log");
return MakeFileName(dbname, number, "log");
}
std::string TableFileName(const std::string& name, uint64_t number) {
std::string TableFileName(const std::string& dbname, uint64_t number) {
assert(number > 0);
return MakeFileName(name, number, "ldb");
return MakeFileName(dbname, number, "ldb");
}
std::string SSTTableFileName(const std::string& name, uint64_t number) {
std::string SSTTableFileName(const std::string& dbname, uint64_t number) {
assert(number > 0);
return MakeFileName(name, number, "sst");
return MakeFileName(dbname, number, "sst");
}
std::string DescriptorFileName(const std::string& dbname, uint64_t number) {
@@ -77,10 +77,10 @@ std::string OldInfoLogFileName(const std::string& dbname) {
// dbname/LOG.old
// dbname/MANIFEST-[0-9]+
// dbname/[0-9]+.(log|sst|ldb)
bool ParseFileName(const std::string& fname,
bool ParseFileName(const std::string& filename,
uint64_t* number,
FileType* type) {
Slice rest(fname);
Slice rest(filename);
if (rest == "CURRENT") {
*number = 0;
*type = kCurrentFile;