elasota
19c3f539a7
COMMON: Add comparison to nullptr to SharedPtr
2022-06-02 18:39:54 -07:00
Le Philousophe
5e3d0029b3
COMMON: Implement move constructor of ScopedPtr
...
This helps when passing ScopedPtr as function arguments
2022-05-08 11:07:40 +02:00
Le Philousophe
3e406ed5af
COMMON: Fix nullptr_t usage
2022-05-08 10:27:59 +02:00
Paul Gilbert
509504d16f
COMMON: Support nullptr assignments to ScopedPtr
2022-05-07 20:16:31 -07:00
Paul Gilbert
edca3fcdea
COMMON: Added move assignment operator to ScopedPtr
2022-05-05 22:41:05 -07:00
elasota
6bdb93bcce
COMMON: Add cast methods and to SharedPtr and WeakPtr, and add owner_before to WeakPtr
2022-05-02 21:03:55 -07:00
elasota
5cb75fdaec
COMMON: Remove implicit bool conversion from WeakPtr
2022-04-25 18:20:19 -07:00
elasota
a1f2121bb8
COMMON: Remove empty BasePtrTrackerDeletionImpl destructor
2022-04-25 18:20:19 -07:00
elasota
2432c67426
COMMON: Fix double destruction when using a deleter.
2022-04-25 18:20:19 -07:00
elasota
22b72dba52
COMMON: Remove BasePtr base class from SharedPtr and WeakPtr. Fix missing refCount method in SharedPtr.
2022-04-25 18:20:19 -07:00
elasota
c8d0186752
COMMON: Fix WeakPtr missing copy constructor
2022-04-25 18:20:19 -07:00
elasota
be5a7cb8e7
COMMON: Fix up WeakPtr logic
2022-04-25 18:20:19 -07:00
elasota
9fa32ac47d
COMMON: Fix WeakPtr preventing object deletion
2022-04-25 18:20:19 -07:00
Eugene Sandulenko
abea37c9bb
ALL: Update ScummVM project license to GPLv3+
2021-12-26 18:48:43 +01:00
Eugene Sandulenko
c544e5119b
COMMON: Remove USE_CXX11 checks, it is now always present
2021-10-31 11:52:29 +02:00
djsrv
9c6fa32c82
COMMON: Create DisposablePtr::getDispose()
2021-08-12 13:18:27 -04:00
djsrv
b40233ffe7
COMMON: Create DisposablePtr::disownPtr()
2021-08-12 13:18:27 -04:00
Orgad Shaneh
a05e54f00c
JANITORIAL: Remove trailing whitespaces
2021-05-04 11:46:30 +03:00
Le Philousophe
f8ff774b8d
COMMON: Fix clang build
...
In C++11 standard, nullptr_t is defined in std and not in global space
2021-02-07 11:38:46 +01:00
Le Philousophe
c49f338a0b
COMMON: Fix GCC deprecated-copy warning in SharedPtr
2021-02-07 10:53:38 +01:00
Paul Gilbert
1b11fe993c
COMMON: Refactor c++11 using keyword from SharedPtr
2021-02-06 21:14:30 -08:00
Paul Gilbert
53656e0338
COMMON: Wrap ptr initializers using nullptr_t in USE_CXX11
2021-02-06 17:11:07 -08:00
Paul Gilbert
8f6391bb5b
COMMON: Added WeakPtr class, refactored SharedPtr
2021-02-06 16:37:31 -08:00
BeWorld
cdc0ad802d
MORPHOS : Fixes clashing D in ptr.h with system defines and casting glGetString ( #2531 )
...
MORPHOS : Fixes clashing D in ptr.h with system defines and casting glGetString
2020-10-16 21:26:42 +02:00
Bartosz Gentkowski
ec24687ce4
DOXYGEN: Add doxygen groups to header files in the common folder
...
Adding @defgroup and @ingroup doxygen tags into all headers
in the common folder that contain doxygen blocks.
This improves the structure, readability, and findability
of information in the resulting output.
This commit targets purely structure and does not deal with
the content of the currently existing doxygen documentation.
2020-10-04 18:25:50 +02:00
David Fioramonti
2fcc429498
COMMON: More nullptr usage in common/ptr
...
Replaces some more ptr=0 with ptr=nullptr.
2018-06-04 03:36:27 -07:00
Bastien Bouclet
955e18c648
COMMON: Use nullptr instead of NULL or 0 where appropriate
2018-05-10 08:35:46 +02:00
Bastien Bouclet
2c8afb2bd2
COMMON: Add a reset method to DisposablePtr
2017-12-28 21:18:51 +01:00
Colin Snover
076667dc00
COMMON: Add limited support for custom deleters to ScopedPtr
...
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-11-18 22:35:12 +01:00
Colin Snover
79dd02373c
COMMON: Prevent implicit conversion of smart pointers to non-bools
2017-10-06 22:10:49 -05:00
Johannes Schickel
854e22b38b
COMMON: Make GPL headers consistent in themselves.
2014-02-18 02:39:33 +01:00
Johannes Schickel
223794fb38
ALL: Make use of defined() for the preprocessor consistent.
...
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-17 22:02:44 +01:00
Christoph Mallon
a64b5e2a77
ALL: Use GCC_ATLEAST().
2012-03-17 20:09:49 +01:00
Christoph Mallon
a5a8833c05
COMMON: Add DisposablePtr<T>, which replaces many repeated implementations of a dispose flag.
2011-08-07 15:19:08 +02:00
Christoph Mallon
2f23ff72c1
COMMON: Remove implicit conversion from ScopedPtr<T> to T*.
2011-08-07 15:19:08 +02:00
Christoph Mallon
84220d2ca0
COMMON: Remove superfluous Common:: qualifiers.
2011-08-07 15:19:07 +02:00
Max Horn
88913c0139
ALL: Remove trailing whitespaces
...
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-06-20 00:59:48 +02:00
strangerke
69b1485a22
GIT: Clean up: Suppress SVN tags, now useless
2011-05-12 01:16:22 +02:00
Max Horn
99cf0e3936
COMMON: Undo changes to common/ptr.h, remove Common::ScopedPtrC
...
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-04 00:49:12 +00:00
Yotam Barnoy
13b904d282
Merge from gsoc2010-plugins
...
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-11-03 22:01:01 +00:00
Yotam Barnoy
c2cafe426e
PLUGINS: used variation of ScopedPtr to clean up load() function
...
svn-id: r52592
2010-09-06 13:31:27 +00:00
Johannes Schickel
e5e94d4511
Strip trailing whitespaces in our common code base.
...
svn-id: r51094
2010-07-21 18:17:51 +00:00
Johannes Schickel
a8d2c0de10
- Renamed SharedPtr<T>::Pointer to SharedPtr<T>::PointerType
...
- Introduced ReferenceType to SharedPtr and ScopedPtr
svn-id: r48337
2010-03-20 20:25:12 +00:00
Johannes Schickel
2a2cfe7ab0
Style fixes / cleanup.
...
svn-id: r48336
2010-03-20 20:16:16 +00:00
Vladimir Menshakov
abdfbafa45
added ScopedPtr template
...
svn-id: r48334
2010-03-20 20:01:44 +00:00
Jordi Vilalta Prat
0d2a75c75d
Fix indentation
...
svn-id: r47499
2010-01-24 12:19:09 +00:00
Max Horn
f242266f6d
Change a couple places from 'end of namespace' to 'End of namespace', for consistency
...
svn-id: r44634
2009-10-04 21:26:33 +00:00
Johannes Schickel
868b589af6
Commit patch #2641592 "Wrong type promotion for SharedPtr" with a slight formatting change.
...
svn-id: r38901
2009-02-26 13:54:21 +00:00
Jordi Vilalta Prat
b1999a2a16
Fixed indentation and removed whitespaces at the end of line
...
svn-id: r35481
2008-12-22 11:22:15 +00:00
Johannes Schickel
6601e6ae7c
Minor formatting cleanup.
...
svn-id: r34319
2008-09-03 19:07:38 +00:00