diff --git a/drivers/FlashIAP.h b/drivers/FlashIAP.h index 5ac0a8986c..8797a34f1c 100644 --- a/drivers/FlashIAP.h +++ b/drivers/FlashIAP.h @@ -63,8 +63,10 @@ namespace mbed { */ class FlashIAP : private NonCopyable { public: - FlashIAP(); - ~FlashIAP(); + constexpr FlashIAP() : _flash(), _page_buf(nullptr) + { + + } /** Initialize a flash IAP device * diff --git a/drivers/source/FlashIAP.cpp b/drivers/source/FlashIAP.cpp index 60d48344ca..a452ad51c4 100644 --- a/drivers/source/FlashIAP.cpp +++ b/drivers/source/FlashIAP.cpp @@ -46,16 +46,6 @@ static inline bool is_aligned(uint32_t number, uint32_t alignment) } } -FlashIAP::FlashIAP() : _page_buf(nullptr) -{ - -} - -FlashIAP::~FlashIAP() -{ - -} - int FlashIAP::init() { int ret = 0; diff --git a/platform/NonCopyable.h b/platform/NonCopyable.h index 487aaffbd8..144ca025b2 100644 --- a/platform/NonCopyable.h +++ b/platform/NonCopyable.h @@ -172,11 +172,11 @@ protected: /** * Disallow construction of NonCopyable objects from outside of its hierarchy. */ - NonCopyable() { } + NonCopyable() = default; /** * Disallow destruction of NonCopyable objects from outside of its hierarchy. */ - ~NonCopyable() { } + ~NonCopyable() = default; #if (!defined(MBED_DEBUG) && (MBED_CONF_PLATFORM_FORCE_NON_COPYABLE_ERROR == 0)) /**