Skip to content

Commit

Permalink
Changes suggested by Chris Jones
Browse files Browse the repository at this point in the history
  • Loading branch information
wmtan committed Sep 23, 2015
1 parent a2c6ad1 commit 7b60ff6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion DataFormats/Common/test/testOwnVector.cc
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#include "cppunit/extensions/HelperMacros.h"
#include <algorithm>
#include <cstring>
#include <iterator>
#include <iostream>
#include <string.h>
#include "DataFormats/Common/interface/OwnVector.h"
#include "DataFormats/Common/interface/Ptr.h"

Expand Down
9 changes: 5 additions & 4 deletions FWCore/Utilities/interface/OffsetToBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,17 @@
* A specialization would look something like this
* (in YourClass.h"
*
* #include "FWCore/Utilities/interface/OffsetToBase.h
* #include "FWCore/Utilities/interface/OffsetToBase.h"
* namespace edm {
* template<>
* class OffsetToBase<YourClass> {
* public OffsetToBase() {}
* size_t offsetToBase(std::type_info const& baseTypeInfo) const {
* YourClass object;
* void const* objectPtr = &object;
* int const dummy = 0;
* YourClass const* object = reinterpret_cast<YourClass const*>(&dummy);
* void const* objectPtr = object;
* if(baseTypeInfo == typeid(BaseClass1)) {
* BaseClass1 const* base = &object;
* BaseClass1 const* base = object;
* void const* basePtr = base;
* return static_cast<char const*>(basePtr) - static_cast<char const*>(objectPtr);
* }
Expand Down

0 comments on commit 7b60ff6

Please sign in to comment.