Skip to content

Commit 1c52bdc

Browse files
committed
fix compiler warnings
1 parent 90d834d commit 1c52bdc

6 files changed

Lines changed: 10 additions & 10 deletions

File tree

src/ruis/widget/base/fraction_band_widget.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class fraction_band_widget : public fraction_widget
2929
{
3030
protected:
3131
struct parameters {
32-
float band_fraction = 0; // current bar size factor from 0 to 1
32+
real band_fraction = 0; // current bar size factor from 0 to 1
3333
};
3434

3535
private:

tests/app/src/root_widget.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ utki::shared_ref<ruis::widget> make_root_widget(utki::shared_ref<ruis::context>
5858
}
5959
},
6060
{
61-
make_window0(c, {0, 0}),
61+
make_window0(c, {0_pp, 0_pp}),
6262
make_window1(c, {300_pp, 10_pp}),
6363
make_tree_view_window(c, {300_pp, 250_pp}),
6464
make_sliders_window(c, {0_pp, 250_pp}),

tests/app2/src/gui.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ utki::shared_ref<ruis::window> make_sliders_window(
9494
.align = {ruis::align::front, ruis::align::front}
9595
},
9696
.fraction_band_params = {
97-
.band_fraction = 0.2
97+
.band_fraction = ruis::real(0.2)
9898
},
9999
.oriented_params = {
100100
.vertical = false

tests/app2/src/rectangles_window.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,10 +117,10 @@ utki::shared_ref<ruis::widget> make_rectangles_window(
117117
},
118118
.rectangle_params{
119119
.corner_radii = {
120-
0, // left-top
120+
0_pp, // left-top
121121
5_pp, // right-top
122122
10_pp, // right-bottom
123-
0 // left-bottom
123+
0_pp // left-bottom
124124
}
125125
}
126126
},
@@ -150,7 +150,7 @@ utki::shared_ref<ruis::widget> make_rectangles_window(
150150
},
151151
.rectangle_params{
152152
.corner_radii = {
153-
0, // left-top
153+
0_pp, // left-top
154154
5_pp, // right-top
155155
10_pp, // right-bottom
156156
15_pp // left-bottom

tests/touch/src/scroll_area_page.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,10 @@ ruis::widget_list make_scroll_area_page_contents(utki::shared_ref<ruis::context>
6464
.dims{50_pp, 1000_pp}
6565
},
6666
.fraction_params{
67-
.fraction = 0.25
67+
.fraction = ruis::real(0.25)
6868
},
6969
.fraction_band_params{
70-
.band_fraction = 0.2
70+
.band_fraction = ruis::real(0.2)
7171
},
7272
.oriented_params{
7373
.vertical = true

tests/wire_area/src/wire_socket.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ void wire_socket::disconnect(){
4646
}
4747

4848
std::array<ruis::vec2, 2> wire_socket::outlet_pos() const noexcept{
49-
ruis::vec2 dir;
50-
ruis::vec2 pos;
49+
ruis::vec2 dir{0, 0};
50+
ruis::vec2 pos{0, 0};
5151
switch(this->params.outlet_orientation){
5252
using enum orientation;
5353

0 commit comments

Comments
 (0)