mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2025-01-12 13:43:38 +00:00
Disallow copy constructors/assignments.
For classes containing pointers/state that should not be copied.
This commit is contained in:
parent
4eb0facacb
commit
46b3d9d087
@ -44,6 +44,11 @@ public:
|
||||
);
|
||||
~CaptureThread();
|
||||
|
||||
CaptureThread(const CaptureThread&) = delete;
|
||||
CaptureThread(CaptureThread&&) = delete;
|
||||
CaptureThread& operator=(const CaptureThread&) = delete;
|
||||
CaptureThread& operator=(CaptureThread&&) = delete;
|
||||
|
||||
const CaptureConfig& state() const {
|
||||
return config;
|
||||
}
|
||||
|
@ -49,6 +49,11 @@ public:
|
||||
ui::Context& context
|
||||
);
|
||||
|
||||
EventDispatcher(const EventDispatcher&) = delete;
|
||||
EventDispatcher(EventDispatcher&&) = delete;
|
||||
EventDispatcher& operator=(const EventDispatcher&) = delete;
|
||||
EventDispatcher& operator=(EventDispatcher&&) = delete;
|
||||
|
||||
void run();
|
||||
static void request_stop();
|
||||
|
||||
|
@ -92,6 +92,8 @@ public:
|
||||
|
||||
NavigationView(const NavigationView&) = delete;
|
||||
NavigationView(NavigationView&&) = delete;
|
||||
NavigationView& operator=(const NavigationView&) = delete;
|
||||
NavigationView& operator=(NavigationView&&) = delete;
|
||||
|
||||
bool is_top() const;
|
||||
|
||||
|
@ -76,6 +76,11 @@ class WaterfallWidget : public View {
|
||||
public:
|
||||
WaterfallWidget();
|
||||
|
||||
WaterfallWidget(const WaterfallWidget&) = delete;
|
||||
WaterfallWidget(WaterfallWidget&&) = delete;
|
||||
WaterfallWidget& operator=(const WaterfallWidget&) = delete;
|
||||
WaterfallWidget& operator=(WaterfallWidget&&) = delete;
|
||||
|
||||
void on_show() override;
|
||||
void on_hide() override;
|
||||
|
||||
|
@ -37,6 +37,11 @@ public:
|
||||
const baseband::Direction direction = baseband::Direction::Receive
|
||||
);
|
||||
~BasebandThread();
|
||||
|
||||
BasebandThread(const BasebandThread&) = delete;
|
||||
BasebandThread(BasebandThread&&) = delete;
|
||||
BasebandThread& operator=(const BasebandThread&) = delete;
|
||||
BasebandThread& operator=(BasebandThread&&) = delete;
|
||||
|
||||
// This getter should die, it's just here to leak information to code that
|
||||
// isn't in the right place to begin with.
|
||||
|
@ -34,6 +34,11 @@ class StreamInput {
|
||||
public:
|
||||
StreamInput(CaptureConfig* const config);
|
||||
|
||||
StreamInput(const StreamInput&) = delete;
|
||||
StreamInput(StreamInput&&) = delete;
|
||||
StreamInput& operator=(const StreamInput&) = delete;
|
||||
StreamInput& operator=(StreamInput&&) = delete;
|
||||
|
||||
size_t write(const void* const data, const size_t length);
|
||||
|
||||
private:
|
||||
|
@ -32,6 +32,11 @@ public:
|
||||
BufferExchange(CaptureConfig* const config);
|
||||
~BufferExchange();
|
||||
|
||||
BufferExchange(const BufferExchange&) = delete;
|
||||
BufferExchange(BufferExchange&&) = delete;
|
||||
BufferExchange& operator=(const BufferExchange&) = delete;
|
||||
BufferExchange& operator=(BufferExchange&&) = delete;
|
||||
|
||||
#if defined(LPC43XX_M0)
|
||||
bool empty() const {
|
||||
return fifo_buffers_for_application->is_empty();
|
||||
|
@ -64,6 +64,8 @@ public:
|
||||
|
||||
Widget(const Widget&) = delete;
|
||||
Widget(Widget&&) = delete;
|
||||
Widget& operator=(const Widget&) = delete;
|
||||
Widget& operator=(Widget&&) = delete;
|
||||
|
||||
virtual ~Widget() = default;
|
||||
|
||||
@ -229,6 +231,11 @@ public:
|
||||
const Color background
|
||||
);
|
||||
|
||||
Image(const Image&) = delete;
|
||||
Image(Image&&) = delete;
|
||||
Image& operator=(const Image&) = delete;
|
||||
Image& operator=(Image&&) = delete;
|
||||
|
||||
void set_bitmap(const Bitmap* bitmap);
|
||||
void set_foreground(const Color color);
|
||||
void set_background(const Color color);
|
||||
|
Loading…
x
Reference in New Issue
Block a user