From: Radoslaw Zarzynski Date: Wed, 25 May 2016 16:30:28 +0000 (+0200) Subject: rgw: temporarily use std::vector in place of static_vector of Boost. X-Git-Tag: v11.0.0~283^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=bc23e0f7fa8491c44fa938eeb954197f6aad2367;p=ceph.git rgw: temporarily use std::vector in place of static_vector of Boost. We want to use boost::container::static_vector to avoid dynamic memory allocations. However, Boost on some platforms we support doesn't offer this container yet. The patch can be safely reverted when we get modern enough Boost on all our platforms. Signed-off-by: Radoslaw Zarzynski --- diff --git a/src/rgw/rgw_swift_auth.cc b/src/rgw/rgw_swift_auth.cc index ceb64aadf1c2..350fa92ec3b1 100644 --- a/src/rgw/rgw_swift_auth.cc +++ b/src/rgw/rgw_swift_auth.cc @@ -4,7 +4,13 @@ #include #include -#include +/* TODO(rzarzynski): we want to use static_vector when it will be available + * also on RHEL/Centos 7. At the moment std::vetor is being used instead. */ +#if 0 +# include +#else +# include +#endif #include "rgw_swift_auth.h" #include "rgw_rest.h" @@ -223,7 +229,12 @@ RGWAuthApplier::aplptr_t RGWTempURLAuthEngine::authenticate() const }; /* Account owner calculates the signature also against a HTTP method. */ + /* TODO(rzarzynski): switch to static_vector when possible. */ +#if 0 boost::container::static_vector allowed_methods; +#else + std::vector allowed_methods; +#endif if (strcmp("HEAD", s->info.method) == 0) { /* HEAD requests are specially handled. */ /* TODO: after getting a newer boost (with static_vector supporting