mirror of
https://github.com/rizinorg/cutter.git
synced 2025-01-18 10:35:25 +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)
|
||||
: core(o.core)
|
||||
{
|
||||
core = o.core;
|
||||
o.core = nullptr;
|
||||
}
|
||||
|
||||
RCoreLocked::~RCoreLocked()
|
||||
|
@ -27,8 +27,11 @@
|
||||
#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))
|
||||
|
||||
struct RCoreLocked
|
||||
class RCoreLocked
|
||||
{
|
||||
RCore* core;
|
||||
|
||||
public:
|
||||
explicit RCoreLocked(RCore* core);
|
||||
RCoreLocked(const RCoreLocked&) = delete;
|
||||
RCoreLocked& operator=(const RCoreLocked&) = delete;
|
||||
@ -36,9 +39,6 @@ struct RCoreLocked
|
||||
~RCoreLocked();
|
||||
operator RCore*() const;
|
||||
RCore* operator->() const;
|
||||
|
||||
private:
|
||||
RCore* core;
|
||||
};
|
||||
|
||||
#define QNOTUSED(x) do { (void)(x); } while ( 0 );
|
||||
|
Loading…
Reference in New Issue
Block a user