aboutsummaryrefslogtreecommitdiff
path: root/common/ptr.h
AgeCommit message (Collapse)Author
2017-11-18COMMON: Add limited support for custom deleters to ScopedPtrColin Snover
Custom deleters of ScopedPtr are not currently fully conforming to C++11's support for custom deleters in std::unique_ptr for the sake of simplicity of implementation. Unlike in the standard library, plain functions and lvalue references are not supported, nor may custom deleters be passed to the constructor at runtime. This can be improved in the future, if necessary, by doing what standard library implementations usually do and creating a Pair class that uses the Empty Base Optimization idiom to avoid extra storage overhead of the deleter instance when it is not needed, as in typical standard library implementations, plus some additional type traits to support the necessary metaprogramming for the different type overloads.
2017-10-06COMMON: Prevent implicit conversion of smart pointers to non-boolsColin Snover
2014-02-18COMMON: Make GPL headers consistent in themselves.Johannes Schickel
2012-03-17ALL: Make use of defined() for the preprocessor consistent.Johannes Schickel
This does not change the use of defined for some NDS source files, since they seem to be (based on?) third party code.
2012-03-17ALL: Use GCC_ATLEAST().Christoph Mallon
2011-08-07COMMON: Add DisposablePtr<T>, which replaces many repeated implementations ↵Christoph Mallon
of a dispose flag.
2011-08-07COMMON: Remove implicit conversion from ScopedPtr<T> to T*.Christoph Mallon
2011-08-07COMMON: Remove superfluous Common:: qualifiers.Christoph Mallon
2011-06-20ALL: Remove trailing whitespacesMax Horn
This tries to make our code a bit more compliant with our code formatting conventions. For future use, this is the command I used: git ls-files "*.cpp" "*.h" | xargs sed -i -e 's/[ \t]*$//'
2011-05-12GIT: Clean up: Suppress SVN tags, now uselessstrangerke
2010-11-04COMMON: Undo changes to common/ptr.h, remove Common::ScopedPtrCMax Horn
The deletePointer() method approach cannot work, as it is called by the destructor of the base class. A possible correct solution would be to enhance ScopedPtr with a "deleter" object like SharedPtr. But this seems overkill as long as we need it in only one place. svn-id: r54057
2010-11-03Merge from gsoc2010-pluginsYotam Barnoy
This merge was extremely difficult to carry out. It wasn't entirely SVN's fault -- there were several merges to the branch that were done by hand. Please check for any issues and regressions. Also note that the DS makefile was not copied over since the "one at a time" plugin mode currently has too much fragmentation ie. it doesn't work. svn-id: r54051
2010-09-06PLUGINS: used variation of ScopedPtr to clean up load() functionYotam Barnoy
svn-id: r52592
2010-07-21Strip trailing whitespaces in our common code base.Johannes Schickel
svn-id: r51094
2010-03-20- Renamed SharedPtr<T>::Pointer to SharedPtr<T>::PointerTypeJohannes Schickel
- Introduced ReferenceType to SharedPtr and ScopedPtr svn-id: r48337
2010-03-20Style fixes / cleanup.Johannes Schickel
svn-id: r48336
2010-03-20added ScopedPtr templateVladimir Menshakov
svn-id: r48334
2010-01-24Fix indentationJordi Vilalta Prat
svn-id: r47499
2009-10-04Change a couple places from 'end of namespace' to 'End of namespace', for ↵Max Horn
consistency svn-id: r44634
2009-02-26Commit patch #2641592 "Wrong type promotion for SharedPtr" with a slight ↵Johannes Schickel
formatting change. svn-id: r38901
2008-12-22Fixed indentation and removed whitespaces at the end of lineJordi Vilalta Prat
svn-id: r35481
2008-09-03Minor formatting cleanup.Johannes Schickel
svn-id: r34319
2008-07-29Formatting.Johannes Schickel
svn-id: r33401
2008-07-29Added a reset method to SharedPtr, which allows NULLifying it.Johannes Schickel
svn-id: r33400
2008-04-07Fixed compilation on gcc 2.95.Johannes Schickel
svn-id: r31447
2008-03-30Committed salty-horse's documentation patch.Johannes Schickel
svn-id: r31333
2008-03-30- Added support for custom deletion operator (aka deleter) support for ↵Johannes Schickel
SharedPtr. - Removed two failing comparison tests of SharedPtr in our test suite (those were not supported according to our documentation anyway) svn-id: r31312
2008-03-30Readded friend statement required by standard conform compilers. Disabled ↵Johannes Schickel
for gcc 2.95 though. svn-id: r31311
2008-03-29- allow SharedPtr objects with incomplete typeJohannes Schickel
- updated documentation accordingly - clarified documentation about comparison operators of SharedPtr svn-id: r31301
2008-03-29Document SharedPtr bool conversion operator; added test cases for it; also ↵Max Horn
added two test cases for the comparision operators, which currently fail svn-id: r31299
2008-03-29Removed unused friends statement (causes internal compiler error with GCC ↵Max Horn
2.95 on BeOS) svn-id: r31298
2008-03-28Committed shared pointer implementation of patch #1895703 "COMMON: Managed ↵Johannes Schickel
List". Unlike the patch on the tracker this commit includes documentation for SharedPtr. svn-id: r31287