- Fix warnings identified by this flag
- Remove the exclude from .clang-tidy file
-bugprone-implicit-widening-of-multiplication-result,
-bugprone-incorrect-roundings,
-bugprone-integer-division,
-bugprone-implicit-widening-of-multiplication-result,
-bugprone-incorrect-roundings,
-bugprone-integer-division,
- -bugprone-macro-parentheses,
-bugprone-narrowing-conversions,
-bugprone-reserved-identifier,
-bugprone-sizeof-expression,
-bugprone-narrowing-conversions,
-bugprone-reserved-identifier,
-bugprone-sizeof-expression,
-#define INFO_SELECTED(x) (x->flag_mask & SELECTION_SELECTED)
+#define INFO_SELECTED(x) ((x)->flag_mask & SELECTION_SELECTED)
static void collection_table_populate_at_new_size(CollectTable *ct, gint w, gint h, gboolean force);
static void collection_table_populate_at_new_size(CollectTable *ct, gint w, gint h, gboolean force);
/* default min and max zoom */
/* default min and max zoom */
-#define PR_ZOOM_MIN -32.0
+#define PR_ZOOM_MIN (-32.0)
#define PR_ZOOM_MAX 32.0
/* distance to drag mouse to disable image flip */
#define PR_ZOOM_MAX 32.0
/* distance to drag mouse to disable image flip */
static gint rt_queue_draw_idle_cb(gpointer data);
#define GET_RIGHT_PIXBUF_OFFSET(rt) \
static gint rt_queue_draw_idle_cb(gpointer data);
#define GET_RIGHT_PIXBUF_OFFSET(rt) \
- (( (rt->stereo_mode & PR_STEREO_RIGHT) && !(rt->stereo_mode & PR_STEREO_SWAP)) || \
- (!(rt->stereo_mode & PR_STEREO_RIGHT) && (rt->stereo_mode & PR_STEREO_SWAP)) ? \
- rt->pr->stereo_pixbuf_offset_right : rt->pr->stereo_pixbuf_offset_left )
+ (( ((rt)->stereo_mode & PR_STEREO_RIGHT) && !((rt)->stereo_mode & PR_STEREO_SWAP)) || \
+ (!((rt)->stereo_mode & PR_STEREO_RIGHT) && ((rt)->stereo_mode & PR_STEREO_SWAP)) ? \
+ (rt)->pr->stereo_pixbuf_offset_right : (rt)->pr->stereo_pixbuf_offset_left )
#define GET_LEFT_PIXBUF_OFFSET(rt) \
#define GET_LEFT_PIXBUF_OFFSET(rt) \
- ((!(rt->stereo_mode & PR_STEREO_RIGHT) && !(rt->stereo_mode & PR_STEREO_SWAP)) || \
- ( (rt->stereo_mode & PR_STEREO_RIGHT) && (rt->stereo_mode & PR_STEREO_SWAP)) ? \
- rt->pr->stereo_pixbuf_offset_right : rt->pr->stereo_pixbuf_offset_left )
+ ((!((rt)->stereo_mode & PR_STEREO_RIGHT) && !((rt)->stereo_mode & PR_STEREO_SWAP)) || \
+ ( ((rt)->stereo_mode & PR_STEREO_RIGHT) && ((rt)->stereo_mode & PR_STEREO_SWAP)) ? \
+ (rt)->pr->stereo_pixbuf_offset_right : (rt)->pr->stereo_pixbuf_offset_left )
static void rt_sync_scroll(RendererTiles *rt)
static void rt_sync_scroll(RendererTiles *rt)
*-------------------------------------------------------------------
*/
*-------------------------------------------------------------------
*/
-#define MATCH_IS_BETWEEN(val, a, b) (b > a ? (val >= a && val <= b) : (val >= b && val <= a))
+#define MATCH_IS_BETWEEN(val, a, b) ((b) > (a) ? ((val) >= (a) && (val) <= (b)) : ((val) >= (b) && (val) <= (a)))
static gboolean search_step_cb(gpointer data);
static gboolean search_step_cb(gpointer data);
-#define VDLIST(_vd_) ((ViewDirInfoList *)(_vd_->info))
+#define VDLIST(_vd_) ((ViewDirInfoList *)((_vd_)->info))
-#define VDTREE(_vd_) ((ViewDirInfoTree *)(_vd_->info))
+#define VDTREE(_vd_) ((ViewDirInfoTree *)((_vd_)->info))