mirror of
https://github.com/rizinorg/cutter.git
synced 2025-01-18 18:38:51 +00:00
code improvements to RCoreLocked
This commit is contained in:
parent
0dc64f8eac
commit
b91ea94543
@ -10,8 +10,9 @@ RCoreLocked::RCoreLocked(RCore *core)
|
|||||||
}
|
}
|
||||||
|
|
||||||
RCoreLocked::RCoreLocked(RCoreLocked&& o)
|
RCoreLocked::RCoreLocked(RCoreLocked&& o)
|
||||||
|
: core(o.core)
|
||||||
{
|
{
|
||||||
core = o.core;
|
o.core = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
RCoreLocked::~RCoreLocked()
|
RCoreLocked::~RCoreLocked()
|
||||||
|
@ -27,8 +27,11 @@
|
|||||||
#define __alert(x) QMessageBox::question (this, "Alert", QString(x), QMessageBox::Ok)
|
#define __alert(x) QMessageBox::question (this, "Alert", QString(x), QMessageBox::Ok)
|
||||||
#define __question(x) (QMessageBox::Yes==QMessageBox::question (this, "Alert", QString(x), QMessageBox::Yes| QMessageBox::No))
|
#define __question(x) (QMessageBox::Yes==QMessageBox::question (this, "Alert", QString(x), QMessageBox::Yes| QMessageBox::No))
|
||||||
|
|
||||||
struct RCoreLocked
|
class RCoreLocked
|
||||||
{
|
{
|
||||||
|
RCore* core;
|
||||||
|
|
||||||
|
public:
|
||||||
explicit RCoreLocked(RCore* core);
|
explicit RCoreLocked(RCore* core);
|
||||||
RCoreLocked(const RCoreLocked&) = delete;
|
RCoreLocked(const RCoreLocked&) = delete;
|
||||||
RCoreLocked& operator=(const RCoreLocked&) = delete;
|
RCoreLocked& operator=(const RCoreLocked&) = delete;
|
||||||
@ -36,9 +39,6 @@ struct RCoreLocked
|
|||||||
~RCoreLocked();
|
~RCoreLocked();
|
||||||
operator RCore*() const;
|
operator RCore*() const;
|
||||||
RCore* operator->() const;
|
RCore* operator->() const;
|
||||||
|
|
||||||
private:
|
|
||||||
RCore* core;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#define QNOTUSED(x) do { (void)(x); } while ( 0 );
|
#define QNOTUSED(x) do { (void)(x); } while ( 0 );
|
||||||
|
Loading…
Reference in New Issue
Block a user