diff options
Diffstat (limited to 'tensorflow/contrib/boosted_trees/lib/quantiles/weighted_quantiles_buffer.h')
-rw-r--r-- | tensorflow/contrib/boosted_trees/lib/quantiles/weighted_quantiles_buffer.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tensorflow/contrib/boosted_trees/lib/quantiles/weighted_quantiles_buffer.h b/tensorflow/contrib/boosted_trees/lib/quantiles/weighted_quantiles_buffer.h index 70037d5bd8..5e316538ce 100644 --- a/tensorflow/contrib/boosted_trees/lib/quantiles/weighted_quantiles_buffer.h +++ b/tensorflow/contrib/boosted_trees/lib/quantiles/weighted_quantiles_buffer.h @@ -33,9 +33,9 @@ template <typename ValueType, typename WeightType, class WeightedQuantilesBuffer { public: struct BufferEntry { - BufferEntry(ValueType v, WeightType w) - : value(std::move(v)), weight(std::move(w)) {} - BufferEntry() : value(), weight(0) {} + BufferEntry(const ValueType& v, const WeightType& w) + : value(v), weight(w) {} + BufferEntry() : value(0), weight(0) {} bool operator<(const BufferEntry& other) const { return kCompFn(value, other.value); @@ -67,7 +67,7 @@ class WeightedQuantilesBuffer { // Push entry to buffer and maintain a compact representation within // pre-defined size limit. - void PushEntry(ValueType value, WeightType weight) { + void PushEntry(const ValueType& value, const WeightType& weight) { // Callers are expected to act on a full compacted buffer after the // PushEntry call returns. QCHECK(!IsFull()) << "Buffer already full: " << max_size_; @@ -78,7 +78,7 @@ class WeightedQuantilesBuffer { } // Push back the entry to the buffer. - vec_.push_back(BufferEntry(std::move(value), std::move(weight))); + vec_.push_back(BufferEntry(value, weight)); } // Returns a sorted vector view of the base buffer and clears the buffer. |