inputs: restore "const" attribute removed by D33759

Summary:
The "const" attribute applies to the type, and placing it
before that return type retains the desired semantics,
yet avoids the compiler error/warning.

Test Plan: Run make

Reviewers: ljin, sdong, igor.sugak, igor

Reviewed By: igor

Subscribers: dhruba

Differential Revision: https://reviews.facebook.net/D33789
main
Jim Meyering 10 years ago
parent 1b4082581c
commit a2b911b63f
  1. 2
      db/compaction.h

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

Loading…
Cancel
Save