From 0d8c52a906847c82e2e1d11848580799a9ed70f4 Mon Sep 17 00:00:00 2001 From: "Adam C. Emerson" Date: Tue, 26 Sep 2017 18:37:31 -0400 Subject: [PATCH] common/options.h: Do not use linked lists of pointers Especially since we're just pushing things in from the end. The linked list has more overhead, is slower, and adds no capability. Signed-off-by: Adam C. Emerson --- src/common/options.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/common/options.h b/src/common/options.h index 01bc61e9e4b2..b8e877069587 100644 --- a/src/common/options.h +++ b/src/common/options.h @@ -4,7 +4,7 @@ #pragma once #include -#include +#include #include #include "include/str_list.h" #include "msg/msg_types.h" @@ -79,19 +79,19 @@ struct Option { // Additionally: "common" for settings that exist in any Ceph code. Do // not use common for settings that are just shared some places: for those // places, list them. - std::list services; + std::vector services; // Topics like: // "service": a catchall for the boring stuff like log/asok paths. // "network" // "performance": a setting that may need adjustment depending on // environment/workload to get best performance. - std::list tags; + std::vector tags; - std::list see_also; + std::vector see_also; value_t min, max; - std::list enum_allowed; + std::vector enum_allowed; bool safe; @@ -233,7 +233,7 @@ struct Option { return *this; } - Option& set_enum_allowed(const std::list allowed) + Option& set_enum_allowed(const std::vector allowed) { enum_allowed = allowed; return *this; -- 2.47.3