diff --git a/qmake.build/c/libstl/libstl.pro b/qmake.build/c/libstl/libstl.pro index 5859e5e..5596b1d 100644 --- a/qmake.build/c/libstl/libstl.pro +++ b/qmake.build/c/libstl/libstl.pro @@ -51,6 +51,6 @@ c_libstl_inc.path = $$PREFIX_DIR/include/dataex/c/libstl c_libstl_inc.files = ../../../src/c/libstl/*.h INSTALLS += global_inc c_global_inc c_streams_inc c_libstl_inc -VER_MAJ = 0 -VER_MIN = 1 -VER_PAT = 0 +#VER_MAJ = 0 +#VER_MIN = 1 +#VER_PAT = 0 diff --git a/src/c/libstl/stlb_read.c b/src/c/libstl/stlb_read.c index 17e511a..2864edb 100644 --- a/src/c/libstl/stlb_read.c +++ b/src/c/libstl/stlb_read.c @@ -134,7 +134,8 @@ int foug_stlb_read(foug_stlb_read_args_t args) foug_task_control_handle_stop(args.task_control); } else { - foug_task_control_set_progress(args.task_control, accum_facet_count_read); + foug_task_control_set_progress(args.task_control, + (foug_real32_t)accum_facet_count_read); } } } /* end while */ diff --git a/src/c/libstl/stlb_write.c b/src/c/libstl/stlb_write.c index 0349bd5..4fc6994 100644 --- a/src/c/libstl/stlb_write.c +++ b/src/c/libstl/stlb_write.c @@ -115,7 +115,8 @@ int foug_stlb_write(foug_stlb_write_args_t args) error = FOUG_STLB_WRITE_TASK_STOPPED_ERROR; } else { - foug_task_control_set_progress(args.task_control, i_facet + 1); + foug_task_control_set_progress(args.task_control, + (foug_real32_t)(i_facet + 1)); } } } /* end for */ diff --git a/src/c/task_control.c b/src/c/task_control.c index e52485f..b769aa9 100644 --- a/src/c/task_control.c +++ b/src/c/task_control.c @@ -28,12 +28,12 @@ foug_task_control_t* foug_task_control_create(foug_malloc_func_t func, ctrl = (*func)(sizeof(struct _internal_foug_task_control)); if (ctrl != 0) { - ctrl->range_min = -1.; - ctrl->range_max = -2.; - ctrl->range_length = -0.; + ctrl->range_min = -1.f; + ctrl->range_max = -2.f; + ctrl->range_length = -0.f; ctrl->step_id = -1; - ctrl->progress_value = -1.; - ctrl->progress_threshold = 0.01; /* Notifies each percent only */ + ctrl->progress_value = -1.f; + ctrl->progress_threshold = 0.01f; /* Notifies each percent only */ ctrl->is_stop_requested = 0; ctrl->cookie = data; ctrl->manip = manip; @@ -53,12 +53,12 @@ void foug_task_control_manip_init(foug_task_control_manip_t* manip) foug_real32_t foug_task_control_get_range_min(const foug_task_control_t* ctrl) { - return ctrl != NULL ? ctrl->range_min : -1.; + return ctrl != NULL ? ctrl->range_min : -1.f; } foug_real32_t foug_task_control_get_range_max(const foug_task_control_t* ctrl) { - return ctrl != NULL ? ctrl->range_max : -2.; + return ctrl != NULL ? ctrl->range_max : -2.f; } void foug_task_control_set_range(foug_task_control_t* ctrl, foug_real32_t min, foug_real32_t max) @@ -87,13 +87,13 @@ void foug_task_control_set_step_id(foug_task_control_t* ctrl, int32_t step_id) foug_real32_t foug_task_control_get_progress_as_pc(const foug_task_control_t* ctrl) { if (ctrl == NULL) - return 0.; - return fabs((ctrl->progress_value - ctrl->range_min) / ctrl->range_length); + return 0.f; + return fabsf((ctrl->progress_value - ctrl->range_min) / ctrl->range_length); } foug_real32_t foug_task_control_get_progress(const foug_task_control_t* ctrl) { - return ctrl != NULL ? ctrl->progress_value : 0.; + return ctrl != NULL ? ctrl->progress_value : 0.f; } void foug_task_control_set_progress(foug_task_control_t* ctrl, foug_real32_t v) @@ -110,7 +110,7 @@ void foug_task_control_set_progress(foug_task_control_t* ctrl, foug_real32_t v) foug_real32_t foug_task_control_get_progress_update_threshold(const foug_task_control_t* ctrl) { - return ctrl != NULL ? ctrl->progress_threshold : 0.01; + return ctrl != NULL ? ctrl->progress_threshold : 0.01f; } void foug_task_control_set_progress_update_threshold(foug_task_control_t* ctrl, foug_real32_t v) @@ -125,9 +125,9 @@ void foug_task_control_reset(foug_task_control_t* ctrl) { if (ctrl != NULL) { ctrl->step_id = -1; - ctrl->progress_value = -1.; - ctrl->range_min = -1.; - ctrl->range_max = -2.; + ctrl->progress_value = -1.f; + ctrl->range_min = -1.f; + ctrl->range_max = -2.f; ctrl->is_stop_requested = 0; } }