Naming and coding style convention, new linter tool. (#945)
* Makefile, Scripts: new linter * About: remove ID from IC * Firmware: remove double define for DIVC/DIVR * Scripts: check folder names too. Docker: replace syntax check with make lint. * Reformat Sources and Migrate to new file naming convention * Docker: symlink clang-format-12 to clang-format * Add coding style guide
This commit is contained in:
18
lib/app-scened-template/text_store.cpp
Normal file
18
lib/app-scened-template/text_store.cpp
Normal file
@@ -0,0 +1,18 @@
|
||||
#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(const char* _text...) {
|
||||
va_list args;
|
||||
va_start(args, _text);
|
||||
vsnprintf(text, text_size, _text, args);
|
||||
va_end(args);
|
||||
}
|
||||
Reference in New Issue
Block a user