mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-08-04 04:34:16 -04:00
Add File::write() that takes std::array.
This commit is contained in:
parent
083711ceb2
commit
7cf55cef52
1 changed files with 6 additions and 0 deletions
|
@ -26,6 +26,7 @@
|
|||
|
||||
#include <cstddef>
|
||||
#include <string>
|
||||
#include <array>
|
||||
|
||||
class File {
|
||||
public:
|
||||
|
@ -40,6 +41,11 @@ public:
|
|||
bool read(void* const data, const size_t bytes_to_read);
|
||||
bool write(const void* const data, const size_t bytes_to_write);
|
||||
|
||||
template<size_t N>
|
||||
bool write(const std::array<uint8_t, N>& data) {
|
||||
return write(data.data(), N);
|
||||
}
|
||||
|
||||
bool puts(const std::string& string);
|
||||
|
||||
bool sync();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue