forked from bartvdbraak/blender
Cleanup: warnings (msvc)
Part of patch D1670 by @LazyDodo
This commit is contained in:
parent
6f22494140
commit
32be51dc66
@ -114,10 +114,12 @@ const char *bl_locale_pgettext(const char *msgctxt, const char *msgid)
|
||||
}
|
||||
catch(std::bad_cast const &e) { /* if std::has_facet<char_message_facet>(l) == false, LC_ALL = "C" case */
|
||||
// std::cout << "bl_locale_pgettext(" << msgid << "): " << e.what() << " \n";
|
||||
(void)e;
|
||||
return msgid;
|
||||
}
|
||||
catch(std::exception const &e) {
|
||||
// std::cout << "bl_locale_pgettext(" << msgctxt << ", " << msgid << "): " << e.what() << " \n";
|
||||
(void)e;
|
||||
return msgid;
|
||||
}
|
||||
}
|
||||
|
@ -2092,7 +2092,7 @@ void BKE_render_result_stamp_info(Scene *scene, Object *camera, struct RenderRes
|
||||
|
||||
void BKE_stamp_info_callback(void *data, struct StampData *stamp_data, StampCallback callback, bool noskip)
|
||||
{
|
||||
if (!callback || !stamp_data) {
|
||||
if ((callback == NULL) || (stamp_data == NULL)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -937,7 +937,7 @@ static void loop_split_worker_do(
|
||||
}
|
||||
}
|
||||
|
||||
static void loop_split_worker(TaskPool *UNUSED(pool), void *taskdata, int UNUSED(threadid))
|
||||
static void loop_split_worker(TaskPool * __restrict UNUSED(pool), void *taskdata, int UNUSED(threadid))
|
||||
{
|
||||
LoopSplitTaskDataCommon *common_data = taskdata;
|
||||
LoopSplitTaskData *data_buff;
|
||||
@ -1116,7 +1116,7 @@ static void loop_split_generator_do(LoopSplitTaskDataCommon *common_data, const
|
||||
#endif
|
||||
}
|
||||
|
||||
static void loop_split_generator(TaskPool *UNUSED(pool), void *taskdata, int UNUSED(threadid))
|
||||
static void loop_split_generator(TaskPool * __restrict UNUSED(pool), void *taskdata, int UNUSED(threadid))
|
||||
{
|
||||
LoopSplitTaskDataCommon *common_data = taskdata;
|
||||
|
||||
|
@ -2327,7 +2327,7 @@ static void psys_thread_create_path(ParticleTask *task, struct ChildParticle *cp
|
||||
child_keys->segments = -1;
|
||||
}
|
||||
|
||||
static void exec_child_path_cache(TaskPool *UNUSED(pool), void *taskdata, int UNUSED(threadid))
|
||||
static void exec_child_path_cache(TaskPool * __restrict UNUSED(pool), void *taskdata, int UNUSED(threadid))
|
||||
{
|
||||
ParticleTask *task = taskdata;
|
||||
ParticleThreadContext *ctx = task->ctx;
|
||||
|
@ -660,7 +660,7 @@ static void distribute_children_exec(ParticleTask *thread, ChildParticle *cpa, i
|
||||
BLI_rng_skip(thread->rng, rng_skip_tot);
|
||||
}
|
||||
|
||||
static void exec_distribute_parent(TaskPool *UNUSED(pool), void *taskdata, int UNUSED(threadid))
|
||||
static void exec_distribute_parent(TaskPool * __restrict UNUSED(pool), void *taskdata, int UNUSED(threadid))
|
||||
{
|
||||
ParticleTask *task = taskdata;
|
||||
ParticleSystem *psys= task->ctx->sim.psys;
|
||||
@ -686,7 +686,7 @@ static void exec_distribute_parent(TaskPool *UNUSED(pool), void *taskdata, int U
|
||||
}
|
||||
}
|
||||
|
||||
static void exec_distribute_child(TaskPool *UNUSED(pool), void *taskdata, int UNUSED(threadid))
|
||||
static void exec_distribute_child(TaskPool * __restrict UNUSED(pool), void *taskdata, int UNUSED(threadid))
|
||||
{
|
||||
ParticleTask *task = taskdata;
|
||||
ParticleSystem *psys = task->ctx->sim.psys;
|
||||
|
@ -1472,7 +1472,7 @@ static void scene_update_all_bases(EvaluationContext *eval_ctx, Scene *scene, Sc
|
||||
}
|
||||
}
|
||||
|
||||
static void scene_update_object_func(TaskPool *pool, void *taskdata, int threadid)
|
||||
static void scene_update_object_func(TaskPool * __restrict pool, void *taskdata, int threadid)
|
||||
{
|
||||
/* Disable print for now in favor of summary statistics at the end of update. */
|
||||
#define PRINT if (false) printf
|
||||
|
@ -39,7 +39,7 @@ size_t BLI_timecode_string_from_time(
|
||||
ATTR_NONNULL();
|
||||
|
||||
size_t BLI_timecode_string_from_time_simple(
|
||||
char *str, size_t maxlen, const double time_seconds)
|
||||
char *str, const size_t maxlen, const double time_seconds)
|
||||
ATTR_NONNULL();
|
||||
|
||||
size_t BLI_timecode_string_from_time_seconds(
|
||||
|
@ -107,7 +107,7 @@ void BLI_buffer_resize(BLI_Buffer *buffer, const size_t new_count)
|
||||
* - Ignored (malloc'd)
|
||||
* - Cleared (when BLI_BUFFER_USE_CALLOC is set)
|
||||
*/
|
||||
void BLI_buffer_reinit(BLI_Buffer *buffer, size_t new_count)
|
||||
void BLI_buffer_reinit(BLI_Buffer *buffer, const size_t new_count)
|
||||
{
|
||||
if (UNLIKELY(new_count > buffer->alloc_count)) {
|
||||
if ((buffer->flag & BLI_BUFFER_USE_STATIC) == 0) {
|
||||
|
@ -42,8 +42,9 @@ struct DynamicLibrary {
|
||||
};
|
||||
|
||||
#ifdef WIN32
|
||||
|
||||
#ifndef _WIN32_WINNT
|
||||
#define _WIN32_WINNT 0x501 /* Windows XP or newer */
|
||||
#endif
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <windows.h>
|
||||
#include "utf_winfunc.h"
|
||||
|
@ -40,6 +40,10 @@
|
||||
|
||||
#include "BLI_sort.h"
|
||||
|
||||
#ifdef min /* for msvc */
|
||||
# undef min
|
||||
#endif
|
||||
|
||||
/* note: modified to use glibc arg order for callback */
|
||||
/* **** qsort based on FreeBSD source (libkern\qsort.c) **** */
|
||||
BLI_INLINE char *med3(char *, char *, char *, BLI_sort_cmp_t, void *);
|
||||
|
@ -841,7 +841,7 @@ bool BLI_strn_endswith(const char *__restrict str, const char *__restrict end, s
|
||||
* \param end The string we look for at the end.
|
||||
* \return If str ends with end.
|
||||
*/
|
||||
bool BLI_str_endswith(const char *__restrict str, const char *end)
|
||||
bool BLI_str_endswith(const char *__restrict str, const char * __restrict end)
|
||||
{
|
||||
const size_t slength = strlen(str);
|
||||
return BLI_strn_endswith(str, end, slength);
|
||||
|
@ -33,8 +33,9 @@
|
||||
#include "PIL_time.h"
|
||||
|
||||
#ifdef WIN32
|
||||
|
||||
#ifndef _WIN32_WINNT
|
||||
#define _WIN32_WINNT 0x501 /* Windows XP or newer */
|
||||
#endif
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <windows.h>
|
||||
|
||||
|
@ -82,7 +82,7 @@ static RigGraph *GLOBAL_RIGG = NULL;
|
||||
|
||||
/*******************************************************************************************************/
|
||||
|
||||
void exec_retargetArctoArc(TaskPool *pool, void *taskdata, int threadid);
|
||||
void exec_retargetArctoArc(TaskPool * __restrict pool, void *taskdata, int threadid);
|
||||
|
||||
static void RIG_calculateEdgeAngles(RigEdge *edge_first, RigEdge *edge_second);
|
||||
float rollBoneByQuat(EditBone *bone, float old_up_axis[3], float qrot[4]);
|
||||
@ -2143,7 +2143,7 @@ static void retargetArctoArc(bContext *C, RigGraph *rigg, RigArc *iarc, RigNode
|
||||
BLI_task_pool_push(rigg->task_pool, exec_retargetArctoArc, p, true, TASK_PRIORITY_HIGH);
|
||||
}
|
||||
|
||||
void exec_retargetArctoArc(TaskPool *UNUSED(pool), void *taskdata, int UNUSED(threadid))
|
||||
void exec_retargetArctoArc(TaskPool * __restrict UNUSED(pool), void *taskdata, int UNUSED(threadid))
|
||||
{
|
||||
RetargetParam *p = (RetargetParam *)taskdata;
|
||||
RigGraph *rigg = p->rigg;
|
||||
|
@ -576,7 +576,7 @@ static void heat_laplacian_create(LaplacianSystem *sys)
|
||||
static void heat_system_free(LaplacianSystem *sys)
|
||||
{
|
||||
BLI_bvhtree_free(sys->heat.bvhtree);
|
||||
MEM_freeN(sys->heat.vltree);
|
||||
MEM_freeN((void *)sys->heat.vltree);
|
||||
MEM_freeN((void *)sys->heat.mlooptri);
|
||||
|
||||
MEM_freeN(sys->heat.mindist);
|
||||
|
@ -134,7 +134,7 @@ bool ED_curve_pick_vert(
|
||||
|
||||
/* helper functions */
|
||||
void ed_editnurb_translate_flag(struct ListBase *editnurb, short flag, const float vec[3]);
|
||||
bool ed_editnurb_extrude_flag(struct EditNurb *editnurb, short flag);
|
||||
bool ed_editnurb_extrude_flag(struct EditNurb *editnurb, const short flag);
|
||||
bool ed_editnurb_spin(float viewmat[4][4], struct Object *obedit, const float axis[3], const float cent[3]);
|
||||
|
||||
/* editcurve_select.c */
|
||||
|
@ -196,13 +196,13 @@ bool snapObjectsContext(
|
||||
/* taks args for all settings */
|
||||
bool snapObjectsEx(
|
||||
struct Scene *scene, struct View3D *v3d, struct ARegion *ar, struct Base *base_act, struct Object *obedit,
|
||||
const float mval[2], SnapSelect snap_select, short snap_mode,
|
||||
const float mval[2], SnapSelect snap_select, const short snap_mode,
|
||||
float *ray_depth,
|
||||
/* return args */
|
||||
float r_loc[3], float r_no[3], float *r_dist_px);
|
||||
bool snapObjectsRayEx(
|
||||
struct Scene *scene, struct View3D *v3d, struct ARegion *ar, struct Base *base_act, struct Object *obedit,
|
||||
const float mval[2], SnapSelect snap_select, short snap_mode,
|
||||
const float mval[2], SnapSelect snap_select, const short snap_mode,
|
||||
const float ray_start[3], const float ray_normal[3], float *ray_depth,
|
||||
/* return args */
|
||||
float r_loc[3], float r_no[3], float *r_dist_px, int *r_index,
|
||||
|
@ -669,7 +669,7 @@ typedef struct ThreadedMaskRasterizeData {
|
||||
int num_scanlines;
|
||||
} ThreadedMaskRasterizeData;
|
||||
|
||||
static void mask_rasterize_func(TaskPool *pool, void *taskdata, int UNUSED(threadid))
|
||||
static void mask_rasterize_func(TaskPool * __restrict pool, void *taskdata, int UNUSED(threadid))
|
||||
{
|
||||
ThreadedMaskRasterizeState *state = (ThreadedMaskRasterizeState *) BLI_task_pool_userdata(pool);
|
||||
ThreadedMaskRasterizeData *data = (ThreadedMaskRasterizeData *) taskdata;
|
||||
|
@ -3638,7 +3638,7 @@ static void project_paint_build_proj_ima(
|
||||
projIma->partRedrawRect = BLI_memarena_alloc(arena, sizeof(ImagePaintPartialRedraw) * PROJ_BOUNDBOX_SQUARED);
|
||||
memset(projIma->partRedrawRect, 0, sizeof(ImagePaintPartialRedraw) * PROJ_BOUNDBOX_SQUARED);
|
||||
projIma->undoRect = (volatile void **) BLI_memarena_alloc(arena, size);
|
||||
memset(projIma->undoRect, 0, size);
|
||||
memset((void *)projIma->undoRect, 0, size);
|
||||
projIma->maskRect = BLI_memarena_alloc(arena, size);
|
||||
memset(projIma->maskRect, 0, size);
|
||||
projIma->valid = BLI_memarena_alloc(arena, size);
|
||||
|
@ -779,7 +779,7 @@ static unsigned char *prefetch_thread_next_frame(
|
||||
return mem;
|
||||
}
|
||||
|
||||
static void prefetch_task_func(TaskPool *pool, void *task_data, int UNUSED(threadid))
|
||||
static void prefetch_task_func(TaskPool * __restrict pool, void *task_data, int UNUSED(threadid))
|
||||
{
|
||||
PrefetchQueue *queue = (PrefetchQueue *)BLI_task_pool_userdata(pool);
|
||||
MovieClip *clip = (MovieClip *)task_data;
|
||||
|
@ -1180,7 +1180,7 @@ static unsigned char *proxy_thread_next_frame(ProxyQueue *queue, MovieClip *clip
|
||||
return mem;
|
||||
}
|
||||
|
||||
static void proxy_task_func(TaskPool *pool, void *task_data, int UNUSED(threadid))
|
||||
static void proxy_task_func(TaskPool * __restrict pool, void *task_data, int UNUSED(threadid))
|
||||
{
|
||||
ProxyThread *data = (ProxyThread *)task_data;
|
||||
ProxyQueue *queue = (ProxyQueue *)BLI_task_pool_userdata(pool);
|
||||
|
@ -1058,7 +1058,7 @@ static void filelist_intern_free(FileListIntern *filelist_intern)
|
||||
MEM_SAFE_FREE(filelist_intern->filtered);
|
||||
}
|
||||
|
||||
static void filelist_cache_preview_runf(TaskPool *pool, void *taskdata, int UNUSED(threadid))
|
||||
static void filelist_cache_preview_runf(TaskPool *__restrict pool, void *taskdata, int UNUSED(threadid))
|
||||
{
|
||||
FileListEntryCache *cache = BLI_task_pool_userdata(pool);
|
||||
FileListEntryPreview *preview = taskdata;
|
||||
@ -1094,7 +1094,7 @@ static void filelist_cache_preview_runf(TaskPool *pool, void *taskdata, int UNUS
|
||||
// printf("%s: End (%d)...\n", __func__, threadid);
|
||||
}
|
||||
|
||||
static void filelist_cache_preview_freef(TaskPool *UNUSED(pool), void *taskdata, int UNUSED(threadid))
|
||||
static void filelist_cache_preview_freef(TaskPool * __restrict UNUSED(pool), void *taskdata, int UNUSED(threadid))
|
||||
{
|
||||
FileListEntryPreview *preview = taskdata;
|
||||
|
||||
|
@ -324,7 +324,7 @@ void nearest_interpolation(ImBuf *in, ImBuf *out, float x, float y, int xout, in
|
||||
|
||||
/*********************** Threaded image processing *************************/
|
||||
|
||||
static void processor_apply_func(TaskPool *pool, void *taskdata, int UNUSED(threadid))
|
||||
static void processor_apply_func(TaskPool * __restrict pool, void *taskdata, int UNUSED(threadid))
|
||||
{
|
||||
void (*do_thread) (void *) = (void (*) (void *)) BLI_task_pool_userdata(pool);
|
||||
do_thread(taskdata);
|
||||
|
@ -512,7 +512,7 @@ typedef struct VolPrecacheState {
|
||||
int totparts;
|
||||
} VolPrecacheState;
|
||||
|
||||
static void vol_precache_part(TaskPool *pool, void *taskdata, int UNUSED(threadid))
|
||||
static void vol_precache_part(TaskPool * __restrict pool, void *taskdata, int UNUSED(threadid))
|
||||
{
|
||||
VolPrecacheState *state = (VolPrecacheState *)BLI_task_pool_userdata(pool);
|
||||
VolPrecachePart *pa = (VolPrecachePart *)taskdata;
|
||||
|
Loading…
Reference in New Issue
Block a user