| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
...for Visual Studio builds, since we don't really get unused function
warnings from the TEST_IFACE items. Plus, we don't have glib autoptr
support in Visual Studio builds, either.
|
| |
|
|
|
|
| |
Noticed by cppcheck.
|
|
|
|
| |
Noticed by cppcheck.
|
| |
|
|
|
|
|
| |
I need to make a subsequent commit to fix the now-unaligned
trailing comments.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* glib/glibmm/interface.cc: Don't call ObjectBase's move assignment operator
from Interface's move assignment operator.
* glib/glibmm/object.cc: Perform of job of sigc::trackable's move constructor
in Object's move constructor.
* glib/glibmm/objectbase.cc: Move constructor: Set gobject_ = nullptr.
Fix the assignment of cpp_destruction_in_progress_.
Move assignment: Add self-assignment guard. Avoid the risk of accidentally
deleting *this. Let a call to initialize_move() do most of the job.
* tests/glibmm_interface_move/main.cc:
* tests/glibmm_object_move/main.cc:
* tests/glibmm_objectbase_move/main.cc: Really test move assignment.
Test that the wrapped C object has been moved, and not copied.
Bug #756962.
|
|
This code got unpleasantly big because I wanted to test a C++
class that wraps a GObject while also implementing a C++ Interface
that wraps a GInterface that the GObject implements. But it seems
to work.
However, the code to test a raw TestInterface is commented out
because the move constructor does not pass the test. I am not sure
if this should even be expected to work:
Interface interface = std::move(object);
or:
Base base = std::move(derived);
Surely that would lose the data (and virtual method table) from the
Derived class anyway?
|