generated from Template/H563ZI-HAL-CMake-Template
删除多个类和结构体的拷贝构造函数和赋值运算符,确保不可复制性
Some checks failed
Build and Upload Artifact / build and upload-artifact (push) Has been cancelled
Some checks failed
Build and Upload Artifact / build and upload-artifact (push) Has been cancelled
This commit is contained in:
@@ -10,7 +10,11 @@ public:
|
||||
explicit DfPlayer(UART_HandleTypeDef* uart)
|
||||
: serialPort(std::make_unique<SerialPort>(uart, kBaudRate, kLength, kTimeout)) {}
|
||||
|
||||
~DfPlayer() = default;
|
||||
~DfPlayer() = default;
|
||||
DfPlayer(const DfPlayer&) = delete;
|
||||
DfPlayer& operator=(const DfPlayer&) = delete;
|
||||
DfPlayer(DfPlayer&&) = delete;
|
||||
DfPlayer& operator=(DfPlayer&&) = delete;
|
||||
|
||||
void Play();
|
||||
void Stop();
|
||||
|
||||
Reference in New Issue
Block a user