Skip to content

Commit

Permalink
CI: macos-clang compatibility fixes (and cleanup comments)
Browse files Browse the repository at this point in the history
danngreen committed Jan 11, 2025
1 parent 06d294a commit 5eaddb7
Showing 3 changed files with 6 additions and 12 deletions.
4 changes: 2 additions & 2 deletions firmware/src/gui/fonts/fonts.cc
Original file line number Diff line number Diff line change
@@ -77,7 +77,7 @@ lv_font_t const *load_from_cache(std::string_view name, unsigned font_size) {
}

void add_font_to_cache(std::string_view name, unsigned font_size, lv_font_t *font) {
font_cache.emplace_back(std::string(name), (lv_coord_t)font_size, font);
font_cache.push_back({std::string(name), (lv_coord_t)font_size, font});
}

////////////////////////////////////////
@@ -130,7 +130,7 @@ lv_font_t const *get_font_from_disk(std::string_view name) {
if (auto font = lv_font_load(full_path.data())) {
font->fallback = &lv_font_montserrat_14;

font_cache.emplace_back(std::string(name), font->line_height, font);
font_cache.push_back({std::string(name), font->line_height, font});

pr_dbg("font %s sz %u loaded into font cache\n", name.data(), font->line_height);

4 changes: 2 additions & 2 deletions firmware/src/patch_play/patch_player_query_patch.hh
Original file line number Diff line number Diff line change
@@ -28,7 +28,7 @@ struct PatchQuery {
for (auto module_id : std::views::iota(0u, pd.module_slugs.size())) {
if (modules[module_id]) {
if (auto state_data = modules[module_id]->save_state(); state_data.size() > 0)
states.emplace_back(module_id, state_data);
states.push_back({module_id, state_data});
}
}

@@ -48,7 +48,7 @@ struct PatchQuery {

for (auto param_id : std::views::iota(0u, num_params)) {
auto val = modules[module_id]->get_param(param_id);
params.emplace_back(module_id, param_id, val);
params.push_back({uint16_t(module_id), uint16_t(param_id), val});
}
}
module_id++;
10 changes: 2 additions & 8 deletions firmware/vcv_plugin/internal/nanovg_pixbuf.cc
Original file line number Diff line number Diff line change
@@ -13,7 +13,7 @@
#include <vector>

#include "console/pr_dbg.hh"
#include "medium/debug_raw.h"
// #include "medium/debug_raw.h"

namespace MetaModule::NanoVG
{
@@ -96,8 +96,6 @@ float renderText(
auto context = get_drawcontext(uptr);
auto canvas = context->canvas;

// DebugPin1High(); // really debug 0

// Move to position
auto lv_x = to_lv_coord(x + fs->xform[4]);
auto lv_y = to_lv_coord(y + fs->xform[5]);
@@ -146,7 +144,7 @@ float renderText(
// lv_obj_set_style_border_width(label, 1, LV_PART_MAIN);

pr_dbg("Creating label at %d,%d align %d (sz %f)\n", lv_x, lv_y, fs->textAlign, fs->fontSize);
context->labels.emplace_back(lv_x, lv_y, fs->textAlign, label, context->draw_frame_ctr);
context->labels.push_back({(float)lv_x, (float)lv_y, fs->textAlign, label, context->draw_frame_ctr});
}

if (text == nullptr)
@@ -171,8 +169,6 @@ float renderText(
lv_obj_set_style_text_color(label, to_lv_text_color(fs->paint->innerColor), LV_PART_MAIN);
lv_label_set_text(label, text);

// DebugPin1Low(); //really debug 0

return 1;
}

@@ -213,7 +209,6 @@ void renderTriangles(void *uptr,
}

void renderDelete(void *uptr) {
// pr_dbg("renderDelete\n");
if (uptr) {
if (auto context = get_drawcontext(uptr))
delete context;
@@ -222,7 +217,6 @@ void renderDelete(void *uptr) {

// Share the textures of GLNVGcontext 'otherUptr' if it's non-NULL.
int renderCreate(void *uptr, void *otherUptr) {
// pr_dbg("RenderCreate\n");
return 1;
}

0 comments on commit 5eaddb7

Please sign in to comment.