From 2ccebc9720a3c7610bb7844a43dd56b4f61ff3c0 Mon Sep 17 00:00:00 2001 From: stephena Date: Mon, 14 Sep 2015 21:44:24 +0000 Subject: [PATCH] Oops, a little too much pruning, detected by compiling in OSX. git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@3206 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba --- src/common/PNGLibrary.cxx | 2 +- src/debugger/DebuggerParser.cxx | 2 +- src/debugger/gui/CartRamWidget.cxx | 2 +- src/debugger/gui/RomListWidget.cxx | 2 +- src/debugger/gui/TogglePixelWidget.cxx | 2 +- src/emucore/FrameBuffer.cxx | 2 +- src/emucore/M6502.cxx | 2 +- src/gui/CheckListWidget.cxx | 2 +- src/gui/EditableWidget.cxx | 4 ++-- src/gui/Font.cxx | 2 +- src/gui/GameList.hxx | 2 +- src/gui/InputTextDialog.cxx | 4 ++-- src/gui/ListWidget.cxx | 8 ++++---- src/gui/RomAuditDialog.cxx | 2 +- src/gui/StringListWidget.cxx | 2 +- src/gui/TabWidget.cxx | 2 +- src/gui/Widget.cxx | 2 +- 17 files changed, 22 insertions(+), 22 deletions(-) diff --git a/src/common/PNGLibrary.cxx b/src/common/PNGLibrary.cxx index 78253203a..2f0e49d1c 100644 --- a/src/common/PNGLibrary.cxx +++ b/src/common/PNGLibrary.cxx @@ -300,7 +300,7 @@ void PNGLibrary::loadImagetoSurface(FBSurface& surface) void PNGLibrary::writeComments(png_structp png_ptr, png_infop info_ptr, const VariantList& comments) { - uInt32 numComments = comments.size(); + uInt32 numComments = uInt32(comments.size()); if(numComments == 0) return; diff --git a/src/debugger/DebuggerParser.cxx b/src/debugger/DebuggerParser.cxx index e68705290..4bd0da6a5 100644 --- a/src/debugger/DebuggerParser.cxx +++ b/src/debugger/DebuggerParser.cxx @@ -1275,7 +1275,7 @@ void DebuggerParser::executeRunTo() const CartDebug& cartdbg = debugger.cartDebug(); const CartDebug::DisassemblyList& list = cartdbg.disassembly().list; - uInt32 count = 0, max_iterations = list.size(); + uInt32 count = 0, max_iterations = int(list.size()); // Create a progress dialog box to show the progress searching through the // disassembly, since this may be a time-consuming operation diff --git a/src/debugger/gui/CartRamWidget.cxx b/src/debugger/gui/CartRamWidget.cxx index ad7184d7f..aea2d17a3 100644 --- a/src/debugger/gui/CartRamWidget.cxx +++ b/src/debugger/gui/CartRamWidget.cxx @@ -63,7 +63,7 @@ CartRamWidget::CartRamWidget( const uInt16 maxlines = 6; StringParser bs(desc, (fwidth - kScrollBarWidth) / myFontWidth); const StringList& sl = bs.stringList(); - uInt32 lines = sl.size(); + uInt32 lines = uInt32(sl.size()); if(lines < 3) lines = 3; if(lines > maxlines) lines = maxlines; diff --git a/src/debugger/gui/RomListWidget.cxx b/src/debugger/gui/RomListWidget.cxx index c787eb2d4..87917136c 100644 --- a/src/debugger/gui/RomListWidget.cxx +++ b/src/debugger/gui/RomListWidget.cxx @@ -225,7 +225,7 @@ void RomListWidget::scrollToCurrent(int item) _currentPos = item - _rows + 1; } - int size = myDisasm->list.size(); + int size = int(myDisasm->list.size()); if (_currentPos < 0 || _rows > size) _currentPos = 0; else if (_currentPos + _rows > size) diff --git a/src/debugger/gui/TogglePixelWidget.cxx b/src/debugger/gui/TogglePixelWidget.cxx index c92dd2b8d..6bcfd5796 100644 --- a/src/debugger/gui/TogglePixelWidget.cxx +++ b/src/debugger/gui/TogglePixelWidget.cxx @@ -92,7 +92,7 @@ void TogglePixelWidget::setIntState(int value, bool swap) int TogglePixelWidget::getIntState() { // Construct int based on current state and swap - uInt32 value = 0, size = _stateList.size(); + uInt32 value = 0, size = int(_stateList.size()); for(uInt32 i = 0; i < size; ++i) { diff --git a/src/emucore/FrameBuffer.cxx b/src/emucore/FrameBuffer.cxx index c5046333e..6f81f674e 100644 --- a/src/emucore/FrameBuffer.cxx +++ b/src/emucore/FrameBuffer.cxx @@ -850,7 +850,7 @@ bool FrameBuffer::VideoModeList::empty() const // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - uInt32 FrameBuffer::VideoModeList::size() const { - return myModeList.size(); + return uInt32(myModeList.size()); } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/emucore/M6502.cxx b/src/emucore/M6502.cxx index 55a382c42..333c897c5 100644 --- a/src/emucore/M6502.cxx +++ b/src/emucore/M6502.cxx @@ -386,7 +386,7 @@ uInt32 M6502::addCondBreak(Expression* e, const string& name) { myBreakConds.emplace_back(unique_ptr(e)); myBreakCondNames.push_back(name); - return myBreakConds.size() - 1; + return uInt32(myBreakConds.size() - 1); } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/gui/CheckListWidget.cxx b/src/gui/CheckListWidget.cxx index f883a3066..b1badcc44 100644 --- a/src/gui/CheckListWidget.cxx +++ b/src/gui/CheckListWidget.cxx @@ -86,7 +86,7 @@ void CheckListWidget::drawWidget(bool hilite) { //cerr << "CheckListWidget::drawWidget\n"; FBSurface& s = _boss->dialog().surface(); - int i, pos, len = _list.size(); + int i, pos, len = int(_list.size()); // Draw a thin frame around the list and to separate columns s.hLine(_x, _y, _x + _w - 1, kColor); diff --git a/src/gui/EditableWidget.cxx b/src/gui/EditableWidget.cxx index f3b464b17..a0e8f07e3 100644 --- a/src/gui/EditableWidget.cxx +++ b/src/gui/EditableWidget.cxx @@ -59,7 +59,7 @@ void EditableWidget::setText(const string& str, bool) if(_filter(tolower(c))) _editString.push_back(c); - _caretPos = _editString.size(); + _caretPos = int(_editString.size()); _editScrollOffset = (_font.getStringWidth(_editString) - (getEditRect().width())); if (_editScrollOffset < 0) @@ -275,7 +275,7 @@ bool EditableWidget::specialKeys(StellaKey key) break; case KBDK_E: - setCaretPos(_editString.size()); + setCaretPos(int(_editString.size())); break; case KBDK_D: diff --git a/src/gui/Font.cxx b/src/gui/Font.cxx index 66c47fed1..9fe8ef3cf 100644 --- a/src/gui/Font.cxx +++ b/src/gui/Font.cxx @@ -53,7 +53,7 @@ int Font::getStringWidth(const string& str) const { // If no width table is specified, use the maximum width if(!myFontDesc.width) - return myFontDesc.maxwidth * str.size(); + return myFontDesc.maxwidth * int(str.size()); else { int space = 0; diff --git a/src/gui/GameList.hxx b/src/gui/GameList.hxx index 4b392211c..2bc4c123f 100644 --- a/src/gui/GameList.hxx +++ b/src/gui/GameList.hxx @@ -45,7 +45,7 @@ class GameList void setMd5(uInt32 i, const string& md5) { myArray[i]._md5 = md5; } - uInt32 size() const { return myArray.size(); } + uInt32 size() const { return uInt32(myArray.size()); } void clear() { myArray.clear(); } void appendGame(const string& name, const string& path, const string& md5, diff --git a/src/gui/InputTextDialog.cxx b/src/gui/InputTextDialog.cxx index 8eeb279b9..be6e1bf15 100644 --- a/src/gui/InputTextDialog.cxx +++ b/src/gui/InputTextDialog.cxx @@ -72,14 +72,14 @@ void InputTextDialog::initialize(const GUI::Font& lfont, const GUI::Font& nfont, // Calculate real dimensions _w = fontWidth * 35; - _h = lineHeight * 4 + labels.size() * (lineHeight + 5); + _h = lineHeight * 4 + int(labels.size()) * (lineHeight + 5); // Determine longest label for(i = 0; i < labels.size(); ++i) { if(labels[i].length() > lwidth) { - lwidth = labels[i].length(); + lwidth = int(labels[i].length()); maxIdx = i; } } diff --git a/src/gui/ListWidget.cxx b/src/gui/ListWidget.cxx index 6ec70fca5..7c9263c2c 100644 --- a/src/gui/ListWidget.cxx +++ b/src/gui/ListWidget.cxx @@ -147,7 +147,7 @@ const string& ListWidget::getSelectedString() const // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - void ListWidget::scrollTo(int item) { - int size = _list.size(); + int size = int(_list.size()); if (item >= size) item = size - 1; if (item < 0) @@ -163,7 +163,7 @@ void ListWidget::scrollTo(int item) // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - void ListWidget::recalc() { - int size = _list.size(); + int size = int(_list.size()); if (_currentPos >= size) _currentPos = size - 1; @@ -175,7 +175,7 @@ void ListWidget::recalc() _editMode = false; - _scrollBar->_numEntries = _list.size(); + _scrollBar->_numEntries = int(_list.size()); _scrollBar->_entriesPerPage = _rows; // Reset to normal data entry @@ -340,7 +340,7 @@ bool ListWidget::handleEvent(Event::Type e) bool handled = true; int oldSelectedItem = _selectedItem; - int size = _list.size(); + int size = int(_list.size()); switch(e) { diff --git a/src/gui/RomAuditDialog.cxx b/src/gui/RomAuditDialog.cxx index e231ccc3b..1647ba2dd 100644 --- a/src/gui/RomAuditDialog.cxx +++ b/src/gui/RomAuditDialog.cxx @@ -129,7 +129,7 @@ void RomAuditDialog::auditRoms() // the ROMs, since this is usually a time-consuming operation ProgressDialog progress(this, instance().frameBuffer().font(), "Auditing ROM files ..."); - progress.setRange(0, files.size() - 1, 5); + progress.setRange(0, int(files.size()) - 1, 5); // Create a entry for the GameList for each file Properties props; diff --git a/src/gui/StringListWidget.cxx b/src/gui/StringListWidget.cxx index 8a8f5e412..59cb47c2a 100644 --- a/src/gui/StringListWidget.cxx +++ b/src/gui/StringListWidget.cxx @@ -48,7 +48,7 @@ void StringListWidget::setList(const StringList& list) void StringListWidget::drawWidget(bool hilite) { FBSurface& s = _boss->dialog().surface(); - int i, pos, len = _list.size(); + int i, pos, len = int(_list.size()); // Draw a thin frame around the list. s.hLine(_x, _y, _x + _w - 1, kColor); diff --git a/src/gui/TabWidget.cxx b/src/gui/TabWidget.cxx index ec728743f..41964461e 100644 --- a/src/gui/TabWidget.cxx +++ b/src/gui/TabWidget.cxx @@ -70,7 +70,7 @@ int TabWidget::addTab(const string& title) { // Add a new tab page _tabs.push_back(Tab(title)); - int numTabs = _tabs.size(); + int numTabs = int(_tabs.size()); // Determine the new tab width int newWidth = _font.getStringWidth(title) + 2 * kTabPadding; diff --git a/src/gui/Widget.cxx b/src/gui/Widget.cxx index bde8d0267..866238e89 100644 --- a/src/gui/Widget.cxx +++ b/src/gui/Widget.cxx @@ -201,7 +201,7 @@ Widget* Widget::setFocusForChain(GuiObject* boss, WidgetArray& arr, bool emitFocusEvents) { FBSurface& s = boss->dialog().surface(); - int size = arr.size(), pos = -1; + int size = int(arr.size()), pos = -1; Widget* tmp; for(int i = 0; i < size; ++i) {