Skip to content

Commit

Permalink
Fix clang warnings. Build on PRs
Browse files Browse the repository at this point in the history
  • Loading branch information
TokisanGames committed Oct 9, 2024
1 parent 8955064 commit 71d4553
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
name: 🛠️ Build All
on: [push, workflow_dispatch]
on:
push:
branches: [ master ]
pull_request:
paths: [ '**' ]
workflow_dispatch:

concurrency:
group: ${{ github.ref }}
Expand Down
8 changes: 4 additions & 4 deletions src/terrain_3d_data.h
Original file line number Diff line number Diff line change
Expand Up @@ -150,9 +150,9 @@ class Terrain3DData : public Object {

// Control Map
void set_control_base_id(const Vector3 &p_global_position, const uint8_t p_base);
uint8_t get_control_base_id(const Vector3 &p_global_position) const;
uint32_t get_control_base_id(const Vector3 &p_global_position) const;
void set_control_overlay_id(const Vector3 &p_global_position, const uint8_t p_overlay);
uint8_t get_control_overlay_id(const Vector3 &p_global_position) const;
uint32_t get_control_overlay_id(const Vector3 &p_global_position) const;
void set_control_blend(const Vector3 &p_global_position, const real_t p_blend);
real_t get_control_blend(const Vector3 &p_global_position) const;
void set_control_angle(const Vector3 &p_global_position, const real_t p_angle);
Expand Down Expand Up @@ -273,7 +273,7 @@ inline void Terrain3DData::set_control_base_id(const Vector3 &p_global_position,
set_control(p_global_position, (control & ~(0x1F << 27)) | enc_base(base));
}

inline uint8_t Terrain3DData::get_control_base_id(const Vector3 &p_global_position) const {
inline uint32_t Terrain3DData::get_control_base_id(const Vector3 &p_global_position) const {
uint32_t control = get_control(p_global_position);
return control == UINT32_MAX ? UINT32_MAX : get_base(control);
}
Expand All @@ -284,7 +284,7 @@ inline void Terrain3DData::set_control_overlay_id(const Vector3 &p_global_positi
set_control(p_global_position, (control & ~(0x1F << 22)) | enc_base(overlay));
}

inline uint8_t Terrain3DData::get_control_overlay_id(const Vector3 &p_global_position) const {
inline uint32_t Terrain3DData::get_control_overlay_id(const Vector3 &p_global_position) const {
uint32_t control = get_control(p_global_position);
return control == UINT32_MAX ? UINT32_MAX : get_overlay(control);
}
Expand Down

0 comments on commit 71d4553

Please sign in to comment.