-// -*- mode:C; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
+// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
#include <errno.h>
#include "include/compat.h"
+using std::map;
+using std::string;
+
+using ceph::bufferlist;
+
CLS_VER(1,0)
CLS_NAME(timeindex)
cls_timeindex_add_op op;
try {
decode(op, in_iter);
- } catch (buffer::error& err) {
+ } catch (ceph::buffer::error& err) {
CLS_LOG(1, "ERROR: cls_timeindex_add_op(): failed to decode op");
return -EINVAL;
}
- for (list<cls_timeindex_entry>::iterator iter = op.entries.begin();
+ for (auto iter = op.entries.begin();
iter != op.entries.end();
++iter) {
cls_timeindex_entry& entry = *iter;
cls_timeindex_list_op op;
try {
decode(op, in_iter);
- } catch (buffer::error& err) {
+ } catch (ceph::buffer::error& err) {
CLS_LOG(1, "ERROR: cls_timeindex_list_op(): failed to decode op");
return -EINVAL;
}
return rc;
}
- list<cls_timeindex_entry>& entries = ret.entries;
- map<string, bufferlist>::iterator iter = keys.begin();
+ auto& entries = ret.entries;
+ auto iter = keys.begin();
string marker;
cls_timeindex_trim_op op;
try {
decode(op, in_iter);
- } catch (buffer::error& err) {
+ } catch (ceph::buffer::error& err) {
CLS_LOG(1, "ERROR: cls_timeindex_trim: failed to decode entry");
return -EINVAL;
}
return rc;
}
- map<string, bufferlist>::iterator iter = keys.begin();
+ auto iter = keys.begin();
bool removed = false;
for (; iter != keys.end(); ++iter) {