mirror of
https://github.com/DarkFlippers/unleashed-firmware.git
synced 2024-12-19 19:31:50 +03:00
19 lines
381 B
C++
19 lines
381 B
C++
|
#include "text-store.h"
|
||
|
#include <furi.h>
|
||
|
|
||
|
TextStore::TextStore(uint8_t _text_size)
|
||
|
: text_size(_text_size) {
|
||
|
text = static_cast<char*>(malloc(text_size + 1));
|
||
|
}
|
||
|
|
||
|
TextStore::~TextStore() {
|
||
|
free(text);
|
||
|
}
|
||
|
|
||
|
void TextStore::set_text_store(const char* _text...) {
|
||
|
va_list args;
|
||
|
va_start(args, _text);
|
||
|
vsnprintf(text, text_size, _text, args);
|
||
|
va_end(args);
|
||
|
}
|