Removed implicit conversion to T* for smart pointers.
This commit is contained in:
parent
81b7b009e9
commit
207efb83b1
@ -100,7 +100,7 @@ receivedMDNInfos MDNHelper::getReceivedMDN(const ref <const message> msg)
|
||||
|
||||
const bool MDNHelper::needConfirmation(const ref <const message> msg)
|
||||
{
|
||||
const header* hdr = msg->getHeader();
|
||||
ref <const header> hdr = msg->getHeader();
|
||||
|
||||
// No "Return-Path" field
|
||||
if (!hdr->hasField(fields::RETURN_PATH))
|
||||
|
@ -400,7 +400,7 @@ void IMAPMessage::extract(const part* p, utility::outputStream& os,
|
||||
|
||||
if (p != NULL)
|
||||
{
|
||||
const IMAPpart* currentPart = static_cast <const IMAPpart*>(p);
|
||||
weak_ref <const IMAPpart> currentPart = static_cast <const IMAPpart*>(p);
|
||||
std::vector <int> numbers;
|
||||
|
||||
numbers.push_back(currentPart->getNumber());
|
||||
|
@ -70,9 +70,6 @@ namespace
|
||||
assert_true("6", r1 == vmime::null);
|
||||
assert_true("7", vmime::null == r1);
|
||||
assert_eq("8", static_cast <A*>(0), r1.get());
|
||||
|
||||
const A* p = r1;
|
||||
assert_eq("9", static_cast <A*>(0), p);
|
||||
}
|
||||
|
||||
void testRefCounting()
|
||||
|
@ -88,7 +88,8 @@ public:
|
||||
|
||||
|
||||
// Access to wrapped object
|
||||
operator const T*() const { return m_ptr; }
|
||||
// operator const T*() const { return m_ptr; }
|
||||
operator const void*() const { return m_ptr; }
|
||||
|
||||
T& operator *() { return *m_ptr; }
|
||||
const T& operator *() const { return *m_ptr; }
|
||||
@ -364,7 +365,8 @@ public:
|
||||
|
||||
|
||||
// Access to wrapped object
|
||||
operator const T*() const { return m_ptr; }
|
||||
// operator const T*() const { return m_ptr; }
|
||||
operator const void*() const { return m_ptr; }
|
||||
|
||||
T& operator *() { return *m_ptr; }
|
||||
const T& operator *() const { return *m_ptr; }
|
||||
@ -375,6 +377,9 @@ public:
|
||||
const T* const get() const { return m_ptr; }
|
||||
T* const get() { return m_ptr; }
|
||||
|
||||
const bool operator !() const { return m_ptr == NULL; }
|
||||
|
||||
|
||||
// dynamic_cast
|
||||
template <class U>
|
||||
weak_ref <U> dynamicCast() const
|
||||
|
Loading…
Reference in New Issue
Block a user