From 22a6c092fc5eb66ec1c75021ef6a6e68e57aa31d Mon Sep 17 00:00:00 2001 From: Gergely Nagy Date: Thu, 31 Mar 2022 21:05:36 +0200 Subject: [PATCH] driver::storage::GD32Flash: Don't duplicate commit() The class we're deriving from - `FlashAsEEPROM`'s `EEPROMClass` - already has a `commit()` method, we do not need our own in the child class, especially not when all it does is call the parent. We previously added this call because in the original implementation of the driver, we had an empty `commit()`. The correct fix is to remove the override, rather than reimplement the inheritance. Spotted by @obra, thanks! Signed-off-by: Gergely Nagy --- src/kaleidoscope/driver/storage/GD32Flash.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/kaleidoscope/driver/storage/GD32Flash.h b/src/kaleidoscope/driver/storage/GD32Flash.h index 3d63c763..e06e0b7e 100644 --- a/src/kaleidoscope/driver/storage/GD32Flash.h +++ b/src/kaleidoscope/driver/storage/GD32Flash.h @@ -38,9 +38,6 @@ class GD32Flash : public EEPROMClass<_StorageProps::length> { void setup() { EEPROMClass<_StorageProps::length>::begin(); } - void commit() { - EEPROMClass<_StorageProps::length>::commit(); - } }; } // namespace storage