@@ -236,7 +236,7 @@ inline void encode_nohead(const std::string& s, bufferlist& bl)
236236{
237237 encode_nohead (std::string_view (s), bl);
238238}
239- inline void decode_nohead (int len, std::string& s, bufferlist::const_iterator& p)
239+ inline void decode_nohead (unsigned len, std::string& s, bufferlist::const_iterator& p)
240240{
241241 s.clear ();
242242 p.copy (len, s);
@@ -318,7 +318,7 @@ inline void encode_nohead(const bufferlist& s, bufferlist& bl)
318318{
319319 bl.append (s);
320320}
321- inline void decode_nohead (int len, bufferlist& s, bufferlist::const_iterator& p)
321+ inline void decode_nohead (unsigned len, bufferlist& s, bufferlist::const_iterator& p)
322322{
323323 s.clear ();
324324 p.copy (len, s);
@@ -463,7 +463,7 @@ inline std::enable_if_t<!traits::supported>
463463encode_nohead (const std::set<T,Comp,Alloc>& s, bufferlist& bl);
464464template <class T , class Comp , class Alloc , typename traits=denc_traits<T>>
465465inline std::enable_if_t <!traits::supported>
466- decode_nohead (int len, std::set<T,Comp,Alloc>& s, bufferlist::iterator& p);
466+ decode_nohead (unsigned len, std::set<T,Comp,Alloc>& s, bufferlist::iterator& p);
467467template <class T , class Comp , class Alloc , typename traits=denc_traits<T>>
468468inline std::enable_if_t <!traits::supported>
469469encode (const boost::container::flat_set<T, Comp, Alloc>& s, bufferlist& bl);
@@ -476,7 +476,7 @@ encode_nohead(const boost::container::flat_set<T, Comp, Alloc>& s,
476476 bufferlist& bl);
477477template <class T , class Comp , class Alloc , typename traits=denc_traits<T>>
478478inline std::enable_if_t <!traits::supported>
479- decode_nohead (int len, boost::container::flat_set<T, Comp, Alloc>& s,
479+ decode_nohead (unsigned len, boost::container::flat_set<T, Comp, Alloc>& s,
480480 bufferlist::iterator& p);
481481template <class T , class Comp , class Alloc >
482482inline void encode (const std::multiset<T,Comp,Alloc>& s, bufferlist& bl);
@@ -496,7 +496,7 @@ inline std::enable_if_t<!traits::supported>
496496encode_nohead (const std::vector<T,Alloc>& v, bufferlist& bl);
497497template <class T , class Alloc , typename traits=denc_traits<T>>
498498inline std::enable_if_t <!traits::supported>
499- decode_nohead (int len, std::vector<T,Alloc>& v, bufferlist::const_iterator& p);
499+ decode_nohead (unsigned len, std::vector<T,Alloc>& v, bufferlist::const_iterator& p);
500500template <class T ,class Alloc >
501501inline void encode (const std::vector<std::shared_ptr<T>,Alloc>& v,
502502 bufferlist& bl,
@@ -522,7 +522,7 @@ inline std::enable_if_t<!traits::supported>
522522encode_nohead (const boost::container::small_vector<T,N,Alloc>& v, bufferlist& bl);
523523template <class T , std::size_t N, class Alloc , typename traits=denc_traits<T>>
524524inline std::enable_if_t <!traits::supported>
525- decode_nohead (int len, boost::container::small_vector<T,N,Alloc>& v, bufferlist::const_iterator& p);
525+ decode_nohead (unsigned len, boost::container::small_vector<T,N,Alloc>& v, bufferlist::const_iterator& p);
526526// std::map
527527template <class T , class U , class Comp , class Alloc ,
528528 typename t_traits=denc_traits<T>, typename u_traits=denc_traits<U>>
@@ -550,7 +550,7 @@ encode_nohead(const std::map<T,U,Comp,Alloc>& m, bufferlist& bl, uint64_t featur
550550template <class T , class U , class Comp , class Alloc ,
551551 typename t_traits=denc_traits<T>, typename u_traits=denc_traits<U>>
552552inline std::enable_if_t <!t_traits::supported || !u_traits::supported>
553- decode_nohead (int n, std::map<T,U,Comp,Alloc>& m, bufferlist::const_iterator& p);
553+ decode_nohead (unsigned n, std::map<T,U,Comp,Alloc>& m, bufferlist::const_iterator& p);
554554template <class T , class U , class Comp , class Alloc ,
555555 typename t_traits=denc_traits<T>, typename u_traits=denc_traits<U>>
556556 inline std::enable_if_t <!t_traits::supported || !u_traits::supported>
@@ -580,7 +580,7 @@ encode_nohead(const boost::container::flat_map<T,U,Comp,Alloc>& m,
580580template <class T , class U , class Comp , class Alloc ,
581581 typename t_traits=denc_traits<T>, typename u_traits=denc_traits<U>>
582582inline std::enable_if_t <!t_traits::supported || !u_traits::supported>
583- decode_nohead (int n, boost::container::flat_map<T,U,Comp,Alloc>& m,
583+ decode_nohead (unsigned n, boost::container::flat_map<T,U,Comp,Alloc>& m,
584584 bufferlist::const_iterator& p);
585585template <class T , class U , class Comp , class Alloc >
586586inline void encode (const std::multimap<T,U,Comp,Alloc>& m, bufferlist& bl);
@@ -844,9 +844,9 @@ inline typename std::enable_if<!traits::supported>::type
844844}
845845template <class T , class Comp , class Alloc , typename traits>
846846inline std::enable_if_t <!traits::supported>
847- decode_nohead (int len, std::set<T,Comp,Alloc>& s, bufferlist::const_iterator& p)
847+ decode_nohead (unsigned len, std::set<T,Comp,Alloc>& s, bufferlist::const_iterator& p)
848848{
849- for (int i=0 ; i<len; i++) {
849+ for (unsigned i=0 ; i<len; i++) {
850850 T v;
851851 decode (v, p);
852852 s.insert (v);
@@ -888,11 +888,11 @@ encode_nohead(const boost::container::flat_set<T, Comp, Alloc>& s,
888888}
889889template <class T , class Comp , class Alloc , typename traits>
890890inline std::enable_if_t <!traits::supported>
891- decode_nohead (int len, boost::container::flat_set<T, Comp, Alloc>& s,
891+ decode_nohead (unsigned len, boost::container::flat_set<T, Comp, Alloc>& s,
892892 bufferlist::iterator& p)
893893{
894894 s.reserve (len);
895- for (int i=0 ; i<len; i++) {
895+ for (unsigned i=0 ; i<len; i++) {
896896 T v;
897897 decode (v, p);
898898 s.insert (v);
@@ -959,7 +959,7 @@ inline std::enable_if_t<!traits::supported>
959959}
960960template <class T , class Alloc , typename traits>
961961inline std::enable_if_t <!traits::supported>
962- decode_nohead (int len, std::vector<T,Alloc>& v, bufferlist::const_iterator& p)
962+ decode_nohead (unsigned len, std::vector<T,Alloc>& v, bufferlist::const_iterator& p)
963963{
964964 v.resize (len);
965965 for (__u32 i=0 ; i<v.size (); i++)
@@ -1005,7 +1005,7 @@ inline std::enable_if_t<!traits::supported>
10051005}
10061006template <class T , std::size_t N, class Alloc , typename traits>
10071007inline std::enable_if_t <!traits::supported>
1008- decode_nohead (int len, boost::container::small_vector<T,N,Alloc>& v, bufferlist::const_iterator& p)
1008+ decode_nohead (unsigned len, boost::container::small_vector<T,N,Alloc>& v, bufferlist::const_iterator& p)
10091009{
10101010 v.resize (len);
10111011 for (auto & i : v)
@@ -1159,7 +1159,7 @@ inline std::enable_if_t<!t_traits::supported || !u_traits::supported>
11591159template <class T , class U , class Comp , class Alloc ,
11601160 typename t_traits, typename u_traits>
11611161inline std::enable_if_t <!t_traits::supported || !u_traits::supported>
1162- decode_nohead (int n, std::map<T,U,Comp,Alloc>& m, bufferlist::const_iterator& p)
1162+ decode_nohead (unsigned n, std::map<T,U,Comp,Alloc>& m, bufferlist::const_iterator& p)
11631163{
11641164 m.clear ();
11651165 while (n--) {
@@ -1172,7 +1172,7 @@ inline std::enable_if_t<!t_traits::supported || !u_traits::supported>
11721172template <std::move_constructible T, std::move_constructible U, class Comp , class Alloc ,
11731173 typename t_traits, typename u_traits>
11741174inline std::enable_if_t <!t_traits::supported || !u_traits::supported>
1175- decode_nohead (int n, std::map<T, U, Comp, Alloc>& m, bufferlist::const_iterator& p)
1175+ decode_nohead (unsigned n, std::map<T, U, Comp, Alloc>& m, bufferlist::const_iterator& p)
11761176{
11771177 m.clear ();
11781178 while (n--) {
@@ -1264,7 +1264,7 @@ template<class T, class U, class Comp, class Alloc,
12641264template <class T , class U , class Comp , class Alloc ,
12651265 typename t_traits, typename u_traits>
12661266inline std::enable_if_t <!t_traits::supported || !u_traits::supported>
1267- decode_nohead (int n, boost::container::flat_map<T,U,Comp,Alloc>& m,
1267+ decode_nohead (unsigned n, boost::container::flat_map<T,U,Comp,Alloc>& m,
12681268 bufferlist::const_iterator& p)
12691269{
12701270 m.clear ();
0 commit comments