From 0fbf112491ef87da257f670744f51c20fa34614d Mon Sep 17 00:00:00 2001 From: jp9000 Date: Fri, 10 Apr 2015 10:07:56 -0700 Subject: [PATCH] UI: Fix vec2 warning Fix warning encountered on clang-504.0.40 on OSX 10.9: obs/window-basic-main.cpp:2884:22: warning: suggest braces around initialization of subobject [-Wmissing-braces] struct vec2 dir = {0.0f, 0.0f}; --- obs/window-basic-main.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/obs/window-basic-main.cpp b/obs/window-basic-main.cpp index d2dae6919..1237b5f50 100644 --- a/obs/window-basic-main.cpp +++ b/obs/window-basic-main.cpp @@ -2881,9 +2881,11 @@ void OBSBasic::Nudge(int dist, MoveDir dir) auto func = [] (obs_scene_t*, obs_sceneitem_t *item, void *param) { MoveInfo *info = reinterpret_cast(param); - struct vec2 dir = {0.0f, 0.0f}; + struct vec2 dir; struct vec2 pos; + vec2_set(&dir, 0.0f, 0.0f); + if (!obs_sceneitem_selected(item)) return true;