Part of patch from #6840:

* GCC 4.5 complains about switchs with cases not part of the window_look enum (see WindowPrivate.h).
* To keep them private, cast the enum to int before use in switchs.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42250 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Jérôme Duval
2011-06-19 18:13:21 +00:00
parent 1f5188bb43
commit e53da92708
3 changed files with 9 additions and 9 deletions
@@ -260,7 +260,7 @@ BeDecorator::_DoLayout()
bool hasTab = false;
switch (Look()) {
switch ((int)Look()) {
case B_MODAL_WINDOW_LOOK:
fBorderWidth = 5;
break;
@@ -422,7 +422,7 @@ BeDecorator::_DrawFrame(BRect invalid)
// Draw the border frame
BRect r = BRect(fTopBorder.LeftTop(), fBottomBorder.RightBottom());
switch (fLook) {
switch ((int)fLook) {
case B_TITLED_WINDOW_LOOK:
case B_DOCUMENT_WINDOW_LOOK:
case B_MODAL_WINDOW_LOOK:
@@ -533,7 +533,7 @@ BeDecorator::_DrawFrame(BRect invalid)
if (!(fFlags & B_NOT_RESIZABLE)) {
r = fResizeRect;
switch (fLook) {
switch ((int)fLook) {
case B_DOCUMENT_WINDOW_LOOK:
{
if (!invalid.Intersects(r))
@@ -877,7 +877,7 @@ BeDecorator::_ResizeBy(BPoint pt, BRegion* dirty)
// Handle invalidation of resize rect
if (dirty && !(fFlags & B_NOT_RESIZABLE)) {
BRect realResizeRect;
switch (fLook) {
switch ((int)fLook) {
case B_DOCUMENT_WINDOW_LOOK:
realResizeRect = fResizeRect;
// Resize rect at old location
@@ -119,7 +119,7 @@ SATDecorator::_DoLayout()
bool hasTab = false;
switch (Look()) {
switch ((int)Look()) {
case B_MODAL_WINDOW_LOOK:
fBorderWidth = 5;
break;
+4 -4
View File
@@ -350,7 +350,7 @@ DefaultDecorator::_DoLayout()
bool hasTab = false;
switch (Look()) {
switch ((int)Look()) {
case B_MODAL_WINDOW_LOOK:
fBorderWidth = 5;
break;
@@ -511,7 +511,7 @@ DefaultDecorator::_DrawFrame(BRect invalid)
// Draw the border frame
BRect r = BRect(fTopBorder.LeftTop(), fBottomBorder.RightBottom());
switch (fLook) {
switch ((int)fLook) {
case B_TITLED_WINDOW_LOOK:
case B_DOCUMENT_WINDOW_LOOK:
case B_MODAL_WINDOW_LOOK:
@@ -655,7 +655,7 @@ DefaultDecorator::_DrawFrame(BRect invalid)
ComponentColors colors;
_GetComponentColors(COMPONENT_RESIZE_CORNER, colors);
switch (fLook) {
switch ((int)fLook) {
case B_DOCUMENT_WINDOW_LOOK:
{
if (!invalid.Intersects(r))
@@ -989,7 +989,7 @@ DefaultDecorator::_ResizeBy(BPoint offset, BRegion* dirty)
// Handle invalidation of resize rect
if (dirty && !(fFlags & B_NOT_RESIZABLE)) {
BRect realResizeRect;
switch (fLook) {
switch ((int)fLook) {
case B_DOCUMENT_WINDOW_LOOK:
realResizeRect = fResizeRect;
// Resize rect at old location