maint: remove extraneous "const" attribute from return type

Summary:
The "const" attribute does not make sense on a return type,
and provokes a warning/error from gcc -W -Wextra.

Test Plan:
  Run "make EXTRA_CXXFLAGS='-W -Wextra'" and see fewer errors.

Reviewers: ljin, sdong, igor.sugak, igor

Reviewed By: igor

Subscribers: dhruba

Differential Revision: https://reviews.facebook.net/D33759
This commit is contained in:
Jim Meyering 2015-02-19 16:41:38 -08:00
parent 9283c7afd2
commit c37937a9ce
3 changed files with 9 additions and 9 deletions

View File

@ -584,22 +584,22 @@ int rocksdb_backup_engine_info_count(const rocksdb_backup_engine_info_t* info) {
return static_cast<int>(info->rep.size());
}
const int64_t rocksdb_backup_engine_info_timestamp(
int64_t rocksdb_backup_engine_info_timestamp(
const rocksdb_backup_engine_info_t* info, int index) {
return info->rep[index].timestamp;
}
const uint32_t rocksdb_backup_engine_info_backup_id(
uint32_t rocksdb_backup_engine_info_backup_id(
const rocksdb_backup_engine_info_t* info, int index) {
return info->rep[index].backup_id;
}
const uint64_t rocksdb_backup_engine_info_size(
uint64_t rocksdb_backup_engine_info_size(
const rocksdb_backup_engine_info_t* info, int index) {
return info->rep[index].size;
}
const uint32_t rocksdb_backup_engine_info_number_files(
uint32_t rocksdb_backup_engine_info_number_files(
const rocksdb_backup_engine_info_t* info, int index) {
return info->rep[index].number_files;
}

View File

@ -92,7 +92,7 @@ class Compaction {
// input level.
// REQUIREMENT: "compaction_input_level" must be >= 0 and
// < "input_levels()"
std::vector<FileMetaData*>* const inputs(size_t compaction_input_level) {
std::vector<FileMetaData*>* inputs(size_t compaction_input_level) {
assert(compaction_input_level < inputs_.size());
return &inputs_[compaction_input_level].files;
}

View File

@ -135,19 +135,19 @@ extern const rocksdb_backup_engine_info_t* rocksdb_backup_engine_get_backup_info
extern int rocksdb_backup_engine_info_count(
const rocksdb_backup_engine_info_t* info);
extern const int64_t rocksdb_backup_engine_info_timestamp(
extern int64_t rocksdb_backup_engine_info_timestamp(
const rocksdb_backup_engine_info_t* info,
int index);
extern const uint32_t rocksdb_backup_engine_info_backup_id(
extern uint32_t rocksdb_backup_engine_info_backup_id(
const rocksdb_backup_engine_info_t* info,
int index);
extern const uint64_t rocksdb_backup_engine_info_size(
extern uint64_t rocksdb_backup_engine_info_size(
const rocksdb_backup_engine_info_t* info,
int index);
extern const uint32_t rocksdb_backup_engine_info_number_files(
extern uint32_t rocksdb_backup_engine_info_number_files(
const rocksdb_backup_engine_info_t* info,
int index);