Skip to content

Commit

Permalink
Rename config file deletion method to clear
Browse files Browse the repository at this point in the history
  • Loading branch information
mairas committed Oct 9, 2024
1 parent 7654fe8 commit a33f44f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/sensesp/system/saveable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ bool FileSystemSaveable::save() {
return true;
}

bool FileSystemSaveable::remove() {
bool FileSystemSaveable::clear() {
if (config_path_ == "") {
return false;
}
Expand Down
6 changes: 3 additions & 3 deletions src/sensesp/system/saveable.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,12 @@ class Saveable {
*/
virtual bool save() { return false; }
/**
* @brief Remove the object from a persistent storage.
* @brief Delete the data from a persistent storage.
*
* @return true
* @return false
*/
virtual bool remove() { return false; }
virtual bool clear() { return false; }

const String& get_config_path() const { return config_path_; }

Expand All @@ -64,7 +64,7 @@ class FileSystemSaveable : public Saveable, virtual public Serializable {

virtual bool load() override;
virtual bool save() override;
virtual bool remove() override;
virtual bool clear() override;

bool find_config_file(const String& config_path, String& filename);
};
Expand Down

0 comments on commit a33f44f

Please sign in to comment.