X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/63b522d64b51d3a9eb31f38d48eab7ad92bb340a..2296fe5018d42d4e0bf9df07c37d31f60d972b32:/samples/richedit/kbList.h?ds=sidebyside diff --git a/samples/richedit/kbList.h b/samples/richedit/kbList.h index 8bde57daf0..6a1cca93ee 100644 --- a/samples/richedit/kbList.h +++ b/samples/richedit/kbList.h @@ -136,7 +136,7 @@ public: deleted by list. See the constructor for more details. @param ownsflag if true, list will own entries */ - void ownsObjects(bool ownsflag = true) + void ownsObjects(bool ownsflag) { ownsEntries = ownsflag; } /** Query whether list owns entries. @@ -236,7 +236,10 @@ protected: param iterator i */ inline void deleteContent(iterator i) - { if(ownsEntries) delete *i; } + { + iterator *i_ptr = &i; + if(ownsEntries) delete i_ptr; + } private: @@ -274,7 +277,7 @@ public: \ /* the cast is needed for MS VC++ 5.0 */ \ { return (type *)((kbList::iterator *)this)->operator*() ; } \ }; \ - inline name(bool ownsEntriesFlag = TRUE) \ + inline name(bool ownsEntriesFlag = true) \ : kbList(ownsEntriesFlag) {} \ \ inline type *pop_back(void) \