Merge lp:~amdmi3/stratagus/cxx11-narrowing into lp:stratagus

Proposed by Dmitry Marakasov
Status: Needs review
Proposed branch: lp:~amdmi3/stratagus/cxx11-narrowing
Merge into: lp:stratagus
Diff against target: 12 lines (+1/-1)
1 file modified
src/video/mng.cpp (+1/-1)
To merge this branch: bzr merge lp:~amdmi3/stratagus/cxx11-narrowing
Reviewer Review Type Date Requested Status
Kyran Jackson Pending
Review via email: mp+259063@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Kyran Jackson (erstmap) wrote :

Hell yeah, this was causing strife for me yesterday!

Unmerged revisions

9013. By Dmitry Marakasov

Fix c++11 narrowing error

src/video/mng.cpp:301:20: error: non-constant-expression cannot be narrowed from type 'int' to 'Sint16' (aka 'short') in initializer list [-Wc++11-narrowing]
                    SDL_Rect rect = {x, y, surface->w, surface->h};
                                     ^

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/video/mng.cpp'
--- src/video/mng.cpp 2013-10-29 13:24:42 +0000
+++ src/video/mng.cpp 2015-05-14 00:35:42 +0000
@@ -298,7 +298,7 @@
298 } else298 } else
299#endif299#endif
300 {300 {
301 SDL_Rect rect = {x, y, surface->w, surface->h};301 SDL_Rect rect = {(Sint16)x, (Sint16)y, (Uint16)surface->w, (Uint16)surface->h};
302 SDL_BlitSurface(surface, NULL, TheScreen, &rect);302 SDL_BlitSurface(surface, NULL, TheScreen, &rect);
303 }303 }
304}304}

Subscribers

People subscribed via source and target branches

to status/vote changes: