summaryrefslogtreecommitdiff
path: root/port
diff options
context:
space:
mode:
authorcostan <costan@google.com>2018-03-12 09:14:44 -0700
committerVictor Costan <pwnall@chromium.org>2018-03-12 09:24:48 -0700
commitaece2068d7375f987685b8b145288c5557f9ce50 (patch)
treee0a0f3b5d8c961572e8222344dbb64e43c1e217e /port
parentddab751002588fe58955357d68d12b062e038d0d (diff)
downloadleveldb-aece2068d7375f987685b8b145288c5557f9ce50.tar.gz
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
Diffstat (limited to 'port')
-rw-r--r--port/port_example.h16
-rw-r--r--port/port_posix.h2
2 files changed, 9 insertions, 9 deletions
diff --git a/port/port_example.h b/port/port_example.h
index b5190e6..88fc9cb 100644
--- a/port/port_example.h
+++ b/port/port_example.h
@@ -70,7 +70,7 @@ class CondVar {
// port::InitOnce(&init_control, &Initializer);
typedef intptr_t OnceType;
#define LEVELDB_ONCE_INIT 0
-extern void InitOnce(port::OnceType*, void (*initializer)());
+void InitOnce(port::OnceType*, void (*initializer)());
// A type that holds a pointer that can be read or written atomically
// (i.e., without word-tearing.)
@@ -105,14 +105,14 @@ class AtomicPointer {
// Store the snappy compression of "input[0,input_length-1]" in *output.
// Returns false if snappy is not supported by this port.
-extern bool Snappy_Compress(const char* input, size_t input_length,
- std::string* output);
+bool Snappy_Compress(const char* input, size_t input_length,
+ std::string* output);
// If input[0,input_length-1] looks like a valid snappy compressed
// buffer, store the size of the uncompressed data in *result and
// return true. Else return false.
-extern bool Snappy_GetUncompressedLength(const char* input, size_t length,
- size_t* result);
+bool Snappy_GetUncompressedLength(const char* input, size_t length,
+ size_t* result);
// Attempt to snappy uncompress input[0,input_length-1] into *output.
// Returns true if successful, false if the input is invalid lightweight
@@ -121,15 +121,15 @@ extern bool Snappy_GetUncompressedLength(const char* input, size_t length,
// REQUIRES: at least the first "n" bytes of output[] must be writable
// where "n" is the result of a successful call to
// Snappy_GetUncompressedLength.
-extern bool Snappy_Uncompress(const char* input_data, size_t input_length,
- char* output);
+bool Snappy_Uncompress(const char* input_data, size_t input_length,
+ char* output);
// ------------------ Miscellaneous -------------------
// If heap profiling is not supported, returns false.
// Else repeatedly calls (*func)(arg, data, n) and then returns true.
// The concatenation of all "data[0,n-1]" fragments is the heap profile.
-extern bool GetHeapProfile(void (*func)(void*, const char*, int), void* arg);
+bool GetHeapProfile(void (*func)(void*, const char*, int), void* arg);
// Extend the CRC to include the first n bytes of buf.
//
diff --git a/port/port_posix.h b/port/port_posix.h
index 5bfc12e..ce52042 100644
--- a/port/port_posix.h
+++ b/port/port_posix.h
@@ -106,7 +106,7 @@ class CondVar {
typedef pthread_once_t OnceType;
#define LEVELDB_ONCE_INIT PTHREAD_ONCE_INIT
-extern void InitOnce(OnceType* once, void (*initializer)());
+void InitOnce(OnceType* once, void (*initializer)());
inline bool Snappy_Compress(const char* input, size_t length,
::std::string* output) {