Skip to content
Snippets Groups Projects
Commit 0b5e2fad authored by Axel Naumann's avatar Axel Naumann
Browse files

Only select Draw<T>() if T is != pointer.

parent 0418aa4a
No related branches found
No related tags found
No related merge requests found
......@@ -21,6 +21,7 @@
#include <vector>
#include "ROOT/TDrawable.hxx"
#include "ROOT/TTypeTraits.hxx"
#include "ROOT/TVirtualCanvasPainter.hxx"
namespace ROOT {
......@@ -101,14 +102,14 @@ public:
}
/// Add a copy of something to be painted.
template<class T>
template<class T, class = typename std::enable_if<!ROOT::IsSmartOrDumbPtr<T>::value>::type>
void Draw(const T& what) {
// Requires GetDrawable(what, options) to be known!
fPrimitives.emplace_back(GetDrawable(std::make_unique<T>(what)));
}
/// Add a copy of something to be painted, with options.
template<class T, class OPTIONS>
template<class T, class OPTIONS, class = typename std::enable_if<!ROOT::IsSmartOrDumbPtr<T>::value>::type>
void Draw(const T& what, const OPTIONS &options) {
// Requires GetDrawable(what, options) to be known!
fPrimitives.emplace_back(GetDrawable(std::make_unique<T>(what), options));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment