Skip to content

Commit

Permalink
Merge pull request #29875 from fwyzard/Apply_clang-format_Alignment
Browse files Browse the repository at this point in the history
Apply code checks to the Alignment packages
  • Loading branch information
cmsbuild authored May 19, 2020
2 parents 72dc73e + 048ff44 commit 96a4cfe
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
10 changes: 5 additions & 5 deletions Alignment/Geners/interface/AbsReader.hh
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ namespace gs {

template <class Base, class Derived>
struct ConcreteReader : public AbsReader<Base> {
virtual ~ConcreteReader() {}
~ConcreteReader() override {}

inline Derived *read(const ClassId &id, std::istream &in) const {
inline Derived *read(const ClassId &id, std::istream &in) const override {
// Assume that Derived::read(id, in) returns a new object
// of type "Derived" allocated on the heap
return Derived::read(id, in);
Expand Down Expand Up @@ -74,8 +74,8 @@ namespace gs {
}

private:
DefaultReader(const DefaultReader &);
DefaultReader &operator=(const DefaultReader &);
DefaultReader(const DefaultReader &) = delete;
DefaultReader &operator=(const DefaultReader &) = delete;
};

// A trivial implementation of the Meyers singleton for use with reader
Expand Down Expand Up @@ -108,7 +108,7 @@ namespace gs {

private:
// Disable the constructor
StaticReader();
StaticReader() = delete;
};
} // namespace gs

Expand Down
4 changes: 2 additions & 2 deletions Alignment/Geners/interface/GenericIO.hh
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ namespace gs {
struct GenericReader<Stream, State, T, Int2Type<IOTraits<int>::ISPOD>> {
inline static bool readIntoPtr(T *&ptr, Stream &str, State *, const bool processClassId) {
CPP11_auto_ptr<T> myptr;
if (ptr == 0)
if (ptr == nullptr)
myptr = CPP11_auto_ptr<T>(new T());
if (processClassId) {
static const ClassId current(ClassId::makeId<T>());
Expand All @@ -161,7 +161,7 @@ namespace gs {
read_pod(str, ptr ? ptr : myptr.get());
if (str.fail())
return false;
if (ptr == 0)
if (ptr == nullptr)
ptr = myptr.release();
return true;
}
Expand Down
2 changes: 1 addition & 1 deletion Alignment/Geners/interface/IOIsContainer.hh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ namespace gs {
static Two test(...);

public:
enum { value = sizeof(IOIsContainer<T>::template test<T>(0)) == 1 };
enum { value = sizeof(IOIsContainer<T>::template test<T>(nullptr)) == 1 };
};

// Char strings get a special treatment
Expand Down

0 comments on commit 96a4cfe

Please sign in to comment.