From: Adam C. Emerson Date: Tue, 26 Sep 2017 22:37:31 +0000 (-0400) Subject: common/options.h: Do not use linked lists of pointers X-Git-Tag: v13.0.1~748^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F17984%2Fhead;p=ceph.git 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 --- 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;