From 2b45aa3593f92cfb56eba403ab23213c8657bb3a Mon Sep 17 00:00:00 2001 From: "Raphael S. Carvalho" Date: Mon, 13 Nov 2017 18:02:01 -0200 Subject: [PATCH] stcs: inline function definition so as not to break one definition rule goal is to allow multiple definitions of header Signed-off-by: Raphael S. Carvalho --- sstables/size_tiered_compaction_strategy.hh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/sstables/size_tiered_compaction_strategy.hh b/sstables/size_tiered_compaction_strategy.hh index 8ed5a5dd6d..930482b6ed 100644 --- a/sstables/size_tiered_compaction_strategy.hh +++ b/sstables/size_tiered_compaction_strategy.hh @@ -156,7 +156,7 @@ public: friend std::vector size_tiered_most_interesting_bucket(const std::vector&); }; -std::vector> +inline std::vector> size_tiered_compaction_strategy::create_sstable_and_length_pairs(const std::vector& sstables) const { std::vector> sstable_length_pairs; @@ -172,7 +172,7 @@ size_tiered_compaction_strategy::create_sstable_and_length_pairs(const std::vect return sstable_length_pairs; } -std::vector> +inline std::vector> size_tiered_compaction_strategy::get_buckets(const std::vector& sstables) const { // sstables sorted by size of its data file. auto sorted_sstables = create_sstable_and_length_pairs(sstables); @@ -227,7 +227,7 @@ size_tiered_compaction_strategy::get_buckets(const std::vector +inline std::vector size_tiered_compaction_strategy::most_interesting_bucket(std::vector> buckets, unsigned min_threshold, unsigned max_threshold) { @@ -262,7 +262,8 @@ size_tiered_compaction_strategy::most_interesting_bucket(std::vector candidates) { +inline compaction_descriptor +size_tiered_compaction_strategy::get_sstables_for_compaction(column_family& cfs, std::vector candidates) { // make local copies so they can't be changed out from under us mid-method int min_threshold = cfs.schema()->min_compaction_threshold(); int max_threshold = cfs.schema()->max_compaction_threshold(); @@ -299,7 +300,7 @@ compaction_descriptor size_tiered_compaction_strategy::get_sstables_for_compacti return sstables::compaction_descriptor(); } -int64_t size_tiered_compaction_strategy::estimated_pending_compactions(column_family& cf) const { +inline int64_t size_tiered_compaction_strategy::estimated_pending_compactions(column_family& cf) const { int min_threshold = cf.schema()->min_compaction_threshold(); int max_threshold = cf.schema()->max_compaction_threshold(); std::vector sstables;