Skip to content

Commit

Permalink
fix build warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
xianjimli committed Nov 28, 2024
1 parent 8f3e1c9 commit 4cb0140
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
7 changes: 1 addition & 6 deletions 3rd/nanovg_plus/base/nanovg_plus.c
Original file line number Diff line number Diff line change
Expand Up @@ -1086,7 +1086,6 @@ nvgp_error_t nvgp_get_curr_clip_rect(nvgp_context_t* ctx, float* x, float* y, fl
CHECK_OBJECT_IS_NULL(ctx);
state = nvgp_get_state(ctx);
if (state != NULL) {
float rect[4];
float ex, ey, tex, tey;
nvgp_matrix_t pxform, invxorm;

Expand Down Expand Up @@ -1516,7 +1515,7 @@ static int nvgp_alloc_text_atlas(nvgp_context_t* ctx) {

void nvgp_text_metrics(nvgp_context_t* ctx, float* ascender, float* descender, float* lineh) {
nvgp_state_t* state = NULL;
float scale, invscale, width;
float scale, invscale;
CHECK_OBJECT_IS_NULL(ctx);
state = nvgp_get_state(ctx);
scale = nvgp_get_font_scale(state) * ctx->ratio;
Expand Down Expand Up @@ -1702,7 +1701,6 @@ static void nvgp_flatten_paths(nvgp_context_t* ctx) {
nvgp_path_t* path;
nvgp_point_t* p0;
nvgp_point_t* p1;
nvgp_point_t* pts;
nvgp_point_t* last;
nvgp_path_cache_t* cache = &ctx->cache;
nvgp_darray_t* commands = &ctx->commands;
Expand Down Expand Up @@ -1763,7 +1761,6 @@ static void nvgp_flatten_paths(nvgp_context_t* ctx) {
// Calculate the direction and length of line segments.
for (j = 0; j < cache->paths.size; j++) {
path = nvgp_darray_get_ptr(&cache->paths, j, nvgp_path_t);
pts = nvgp_darray_get_ptr(&cache->points, path->first, nvgp_point_t);

// If the first and last points are the same, remove the last, mark as closed path.
p0 = nvgp_darray_get_ptr(&cache->points, path->first + path->count - 1, nvgp_point_t);
Expand Down Expand Up @@ -2014,7 +2011,6 @@ static nvgp_error_t nvgp_expand_fill(nvgp_context_t* ctx, float w, nvgp_line_joi
nvgp_point_t* p0;
nvgp_point_t* p1;
nvgp_path_t* path = nvgp_darray_get_ptr(&cache->paths, i, nvgp_path_t);
nvgp_point_t* pts = nvgp_darray_get_ptr(&cache->points, path->first, nvgp_point_t);

// Calculate shape vertices.
woff = 0.5f * aa;
Expand Down Expand Up @@ -2288,7 +2284,6 @@ static nvgp_error_t nvgp_expand_stroke(nvgp_context_t* ctx, float w, float fring
nvgp_point_t* p0;
nvgp_point_t* p1;
nvgp_path_t* path = nvgp_darray_get_ptr(&cache->paths, i, nvgp_path_t);
nvgp_point_t* pts = nvgp_darray_get_ptr(&cache->points, path->first, nvgp_point_t);

path->fill = 0;
path->nfill = 0;
Expand Down
2 changes: 1 addition & 1 deletion src/base/opengl.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#define opengl_loadGL() gladLoadGL()
#endif /*WITHOUT_GLAD*/

static void opengl_init(void) {
static inline void opengl_init(void) {
opengl_loadGL();

glDisable(GL_STENCIL_TEST);
Expand Down

0 comments on commit 4cb0140

Please sign in to comment.