summaryrefslogtreecommitdiffstatshomepage
path: root/src/lib
diff options
context:
space:
mode:
author Olivier Galibert <galibert@pobox.com>2021-05-27 09:18:17 +0200
committer Olivier Galibert <galibert@pobox.com>2021-05-27 09:18:17 +0200
commitef0d18e0bb96001bcd8465b2c455293321900153 (patch)
tree7365b693a98ecf36a014b80606f97e5f0b29ceed /src/lib
parent3ade0ad948b40e2d613aa456d22ba24d2cdeda9f (diff)
floppy: Change the formats from an intrusive list to a vector
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/formats/flopimg.cpp17
-rw-r--r--src/lib/formats/flopimg.h7
2 files changed, 1 insertions, 23 deletions
diff --git a/src/lib/formats/flopimg.cpp b/src/lib/formats/flopimg.cpp
index ba75a1ed7b8..ef53841d863 100644
--- a/src/lib/formats/flopimg.cpp
+++ b/src/lib/formats/flopimg.cpp
@@ -995,23 +995,6 @@ bool floppy_image_format_t::has_variant(const std::vector<uint32_t> &variants, u
return false;
}
-floppy_image_format_t::floppy_image_format_t()
-{
- next = nullptr;
-}
-
-floppy_image_format_t::~floppy_image_format_t()
-{
-}
-
-void floppy_image_format_t::append(floppy_image_format_t *_next)
-{
- if(next)
- next->append(_next);
- else
- next = _next;
-}
-
bool floppy_image_format_t::save(io_generic *, const std::vector<uint32_t> &, floppy_image *)
{
return false;
diff --git a/src/lib/formats/flopimg.h b/src/lib/formats/flopimg.h
index 49d9ae1f29c..b7fe8755cd8 100644
--- a/src/lib/formats/flopimg.h
+++ b/src/lib/formats/flopimg.h
@@ -224,8 +224,7 @@ class floppy_image;
class floppy_image_format_t
{
public:
- floppy_image_format_t();
- virtual ~floppy_image_format_t();
+ virtual ~floppy_image_format_t() = default;
/*! @brief Identify an image.
The identify function tests if the image is valid
@@ -270,10 +269,6 @@ public:
//! @returns true if format supports saving.
virtual bool supports_save() const = 0;
- //! Used if a linked list of formats is needed
- floppy_image_format_t *next;
- //! This appends a format to the linked list of formats, needed for floppy_image_device().
- void append(floppy_image_format_t *_next);
//! This checks if the file has the proper extension for this format.
//! @param file_name
//! @returns true if file matches the extension.