diff options
author | 2023-10-08 09:00:33 -0400 | |
---|---|---|
committer | 2023-10-08 09:02:47 -0400 | |
commit | 07b3bdd04f9aeb9d1e56b6d03ef998d383153fc6 (patch) | |
tree | cca31406789a294b5123d1ed394cdf4579b6aa8a /src/lib/formats/poly_dsk.cpp | |
parent | db48a71d4fe2c0331b4a4475aa4ec602e6896091 (diff) |
Floppy format API refinements
- Add noexcept to format information overrides and several simple floppy_image accessors.
- Be more const-correct and use references instead of raw pointers wherever applicable. In particular, floppy_image_device::load and floppy_image_device::save now take a reference to floppy_image rather than a pointer, const-qualified in the latter case.
Diffstat (limited to 'src/lib/formats/poly_dsk.cpp')
-rw-r--r-- | src/lib/formats/poly_dsk.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/lib/formats/poly_dsk.cpp b/src/lib/formats/poly_dsk.cpp index 72c6ca16bc0..4a264e293a1 100644 --- a/src/lib/formats/poly_dsk.cpp +++ b/src/lib/formats/poly_dsk.cpp @@ -19,22 +19,22 @@ poly_cpm_format::poly_cpm_format() { } -const char *poly_cpm_format::name() const +const char *poly_cpm_format::name() const noexcept { return "cpm"; } -const char *poly_cpm_format::description() const +const char *poly_cpm_format::description() const noexcept { return "Poly CP/M disk image"; } -const char *poly_cpm_format::extensions() const +const char *poly_cpm_format::extensions() const noexcept { return "cpm"; } -bool poly_cpm_format::supports_save() const +bool poly_cpm_format::supports_save() const noexcept { return true; } @@ -61,7 +61,7 @@ int poly_cpm_format::identify(util::random_read &io, uint32_t form_factor, const return 0; } -bool poly_cpm_format::load(util::random_read &io, uint32_t form_factor, const std::vector<uint32_t> &variants, floppy_image *image) const +bool poly_cpm_format::load(util::random_read &io, uint32_t form_factor, const std::vector<uint32_t> &variants, floppy_image &image) const { uint64_t size; if (io.length(size) || io.seek(0, SEEK_SET)) |