Hi,

I found that the following lines made errors:
// OwnPtrCommon.h
template <typename T> inline void deleteOwnedPtr(T* ptr)
{
        typedef char known[sizeof(T) ? 1 : -1];
        if (sizeof(known))
    delete ptr;
}

I am very curious about why the author wrote like the above.
What could be the author's intention?

For error-fix, I changed it like the following:

template <typename T> inline void deleteOwnedPtr(T* ptr)
{
      if(sizeof(T)>0)
            delete ptr;
}

What could be the above code's mistake?


Thanks,

Daebark
_______________________________________________
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev

Reply via email to