Skip to content

Commit 8d173f8

Browse files
committed
[CORE] Apply code-checks-all with misc-definitions-in-headers additional check
1 parent 2203a47 commit 8d173f8

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

DataFormats/Common/interface/DetSetVectorNew.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,11 +107,11 @@ namespace edmNew {
107107
size = rh.size;
108108
return *this;
109109
}
110-
Item(Item&& rh) noexcept : id(std::move(rh.id)), offset(int(rh.offset)), size(std::move(rh.size)) {}
110+
Item(Item&& rh) noexcept : id(rh.id), offset(int(rh.offset)), size(rh.size) {}
111111
Item& operator=(Item&& rh) noexcept {
112-
id = std::move(rh.id);
112+
id = rh.id;
113113
offset = int(rh.offset);
114-
size = std::move(rh.size);
114+
size = rh.size;
115115
return *this;
116116
}
117117

DataFormats/Common/interface/Ref.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ namespace edm {
253253
key_type index() const { return index_; }
254254

255255
/// Returns true if container referenced by the Ref has been cached
256-
bool hasProductCache() const { return product_.productPtr() != 0; }
256+
bool hasProductCache() const { return product_.productPtr() != nullptr; }
257257

258258
/// Checks if collection is in memory or available
259259
/// in the Event. No type checking is done.

DataFormats/Common/interface/RefProd.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ namespace edm {
127127
EDProductGetter const* productGetter() const { return product_.productGetter(); }
128128

129129
/// Checks if product is in memory.
130-
bool hasCache() const { return product_.productPtr() != 0; }
130+
bool hasCache() const { return product_.productPtr() != nullptr; }
131131

132132
/// Checks if product is in memory.
133133
bool hasProductCache() const { return hasCache(); }

DataFormats/Common/interface/ValidHandle.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@ namespace edm {
2222
using element_type = T;
2323

2424
ValidHandle() = delete;
25-
ValidHandle(T const* prod, ProductID id) noexcept(false) : product_(prod), id_(std::move(id)) {
25+
ValidHandle(T const* prod, ProductID id) noexcept(false) : product_(prod), id_(id) {
2626
vhhelper::throwIfNotValid(prod);
2727
}
2828

2929
//NOTE: C++ disallows references to null
30-
ValidHandle(T const& prod, ProductID id) noexcept(true) : product_(&prod), id_(std::move(id)) {}
30+
ValidHandle(T const& prod, ProductID id) noexcept(true) : product_(&prod), id_(id) {}
3131
ValidHandle(const ValidHandle<T>&) = default;
3232
ValidHandle<T>& operator=(ValidHandle<T> const& rhs) = default;
3333
~ValidHandle() = default;

FWCore/Utilities/src/stemFromPath.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
namespace edm {
44
std::string_view stemFromPath(std::string_view path) {
5-
auto begin = path.rfind("/");
5+
auto begin = path.rfind('/');
66
if (begin == std::string_view::npos) {
7-
begin = path.rfind(":");
7+
begin = path.rfind(':');
88
if (begin == std::string_view::npos) {
99
// shouldn't really happen?
1010
begin = 0;
@@ -14,7 +14,7 @@ namespace edm {
1414
} else {
1515
begin += 1;
1616
}
17-
auto end = path.find(".", begin);
17+
auto end = path.find('.', begin);
1818
return path.substr(begin, end - begin);
1919
}
2020
} // namespace edm

0 commit comments

Comments
 (0)