mirror of
https://github.com/eried/portapack-mayhem.git
synced 2024-10-01 01:26:06 -04:00
Add File::write() that takes std::array.
This commit is contained in:
parent
083711ceb2
commit
7cf55cef52
@ -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…
Reference in New Issue
Block a user