Compiler warning cleanup (#113)

Cleanup + expose more methods for external ELFs
This commit is contained in:
Ken Van Hoeylandt
2024-12-08 19:59:01 +01:00
committed by GitHub
parent 415442e410
commit e4206e8637
30 changed files with 506 additions and 127 deletions
+5 -2
View File
@@ -62,20 +62,23 @@ bool Bundle::optString(const std::string& key, std::string& out) const {
void Bundle::putBool(const std::string& key, bool value) {
this->entries[key] = {
.type = TypeBool,
.value_bool = value
.value_bool = value,
.value_string = ""
};
}
void Bundle::putInt32(const std::string& key, int32_t value) {
this->entries[key] = {
.type = TypeInt32,
.value_int32 = value
.value_int32 = value,
.value_string = ""
};
}
void Bundle::putString(const std::string& key, const std::string& value) {
this->entries[key] = {
.type = TypeString,
.value_bool = false,
.value_string = value
};
}
-1
View File
@@ -23,7 +23,6 @@ private:
} Type;
typedef struct {
std::string key;
Type type;
union {
bool value_bool;
-1
View File
@@ -1,6 +1,5 @@
#include "Pubsub.h"
#include "Check.h"
#include <list>
namespace tt {
+1 -1
View File
@@ -6,7 +6,7 @@
namespace tt::string {
int findLastIndex(const char* text, size_t from_index, char find) {
for (size_t i = from_index; i >= 0; i--) {
for (int i = (int)from_index; i >= 0; i--) {
if (text[i] == find) {
return (int)i;
}
+2
View File
@@ -71,6 +71,7 @@ static void thread_body(void* context) {
Thread::Thread() :
data({
.thread = nullptr,
.taskHandle = nullptr,
.state = StateStopped,
.callback = nullptr,
@@ -90,6 +91,7 @@ Thread::Thread(
Callback callback,
_Nullable void* callbackContext) :
data({
.thread = nullptr,
.taskHandle = nullptr,
.state = StateStopped,
.callback = callback,
-2
View File
@@ -5,8 +5,6 @@
namespace tt::file {
#define TAG "file"
long getSize(FILE* file);
std::unique_ptr<uint8_t[]> readBinary(const char* filepath, size_t& outSize);