mirror of
https://port.numenaute.org/aleajactaest/khanat-code-old.git
synced 2024-11-23 07:16:15 +00:00
Fixed: GCC warnings
This commit is contained in:
parent
584bb6cc99
commit
1b7bdfd485
5 changed files with 17 additions and 17 deletions
|
@ -335,7 +335,7 @@ namespace NLGUI
|
||||||
sint32 newW, sint32 newH) const;
|
sint32 newW, sint32 newH) const;
|
||||||
|
|
||||||
// move windows according to new screen size
|
// move windows according to new screen size
|
||||||
void moveAllWindowsToNewScreenSize(sint32 newScreenW, sint32 newScreenH, bool fixCurrentUI );
|
void moveAllWindowsToNewScreenSize(uint32 newScreenW, uint32 newScreenH, bool fixCurrentUI );
|
||||||
|
|
||||||
void updateAllLocalisedElements();
|
void updateAllLocalisedElements();
|
||||||
|
|
||||||
|
|
|
@ -715,7 +715,7 @@ namespace NLGUI
|
||||||
// *** Get the column sizes, we need to know min for the table
|
// *** Get the column sizes, we need to know min for the table
|
||||||
|
|
||||||
uint i;
|
uint i;
|
||||||
sint column = 0;
|
uint column = 0;
|
||||||
_Columns.clear ();
|
_Columns.clear ();
|
||||||
for (i=0; i<_Cells.size(); i++)
|
for (i=0; i<_Cells.size(); i++)
|
||||||
{
|
{
|
||||||
|
@ -783,13 +783,12 @@ namespace NLGUI
|
||||||
// new column, set rowspan from current <TD>
|
// new column, set rowspan from current <TD>
|
||||||
_Columns[column].RowSpan = cell->RowSpan;
|
_Columns[column].RowSpan = cell->RowSpan;
|
||||||
float colspan = 1.f / cell->ColSpan;
|
float colspan = 1.f / cell->ColSpan;
|
||||||
float rowspan = 1.f / cell->RowSpan;
|
|
||||||
|
|
||||||
// Update sizes
|
// Update sizes
|
||||||
if (cellWidth*colspan > _Columns[column].Width)
|
if (cellWidth*colspan > _Columns[column].Width)
|
||||||
_Columns[column].Width = cellWidth*colspan;
|
_Columns[column].Width = (sint32)(cellWidth*colspan);
|
||||||
if (cell->WidthMax*colspan > _Columns[column].WidthMax)
|
if (cell->WidthMax*colspan > _Columns[column].WidthMax)
|
||||||
_Columns[column].WidthMax = cell->WidthMax*colspan;
|
_Columns[column].WidthMax = (sint32)(cell->WidthMax*colspan);
|
||||||
if (cell->TableRatio*colspan > _Columns[column].TableRatio)
|
if (cell->TableRatio*colspan > _Columns[column].TableRatio)
|
||||||
_Columns[column].TableRatio = cell->TableRatio*colspan;
|
_Columns[column].TableRatio = cell->TableRatio*colspan;
|
||||||
if (cell->WidthWanted*colspan + additionnalWidth > _Columns[column].WidthWanted)
|
if (cell->WidthWanted*colspan + additionnalWidth > _Columns[column].WidthWanted)
|
||||||
|
@ -1035,7 +1034,7 @@ namespace NLGUI
|
||||||
if (cell->TableColumnIndex > 0)
|
if (cell->TableColumnIndex > 0)
|
||||||
{
|
{
|
||||||
// we have active rowspan, must add up 'skipped' columns
|
// we have active rowspan, must add up 'skipped' columns
|
||||||
for( ; column<cell->TableColumnIndex; ++column)
|
for( ; column < (uint)cell->TableColumnIndex; ++column)
|
||||||
currentX += _Columns[column].Width + padding*2 + CellSpacing;
|
currentX += _Columns[column].Width + padding*2 + CellSpacing;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1081,7 +1080,7 @@ namespace NLGUI
|
||||||
cell->Group->updateCoords();
|
cell->Group->updateCoords();
|
||||||
|
|
||||||
// Resize the row array
|
// Resize the row array
|
||||||
float rowspan = 1 / cell->RowSpan;
|
float rowspan = 1.f / (float)cell->RowSpan;
|
||||||
_Rows.back().Height = std::max((sint32)(cell->Height*rowspan), std::max(_Rows.back().Height, (sint32)(cell->Group->getH()*rowspan)));
|
_Rows.back().Height = std::max((sint32)(cell->Height*rowspan), std::max(_Rows.back().Height, (sint32)(cell->Group->getH()*rowspan)));
|
||||||
|
|
||||||
// Next column
|
// Next column
|
||||||
|
|
|
@ -398,7 +398,7 @@ namespace NLGUI
|
||||||
{
|
{
|
||||||
time_t now;
|
time_t now;
|
||||||
time(&now);
|
time(&now);
|
||||||
if (expires < now)
|
if (expires < (uint32)now)
|
||||||
{
|
{
|
||||||
nlwarning("cookie expired, remove from list '%s'", nsformat);
|
nlwarning("cookie expired, remove from list '%s'", nsformat);
|
||||||
HTTPCookies[domain].erase(chunks[5]);
|
HTTPCookies[domain].erase(chunks[5]);
|
||||||
|
|
|
@ -1774,7 +1774,7 @@ namespace NLGUI
|
||||||
}
|
}
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
void CWidgetManager::moveAllWindowsToNewScreenSize(sint32 newScreenW, sint32 newScreenH, bool fixCurrentUI)
|
void CWidgetManager::moveAllWindowsToNewScreenSize(uint32 newScreenW, uint32 newScreenH, bool fixCurrentUI)
|
||||||
{
|
{
|
||||||
std::vector< CWidgetManager::SMasterGroup > &_MasterGroups = getAllMasterGroup();
|
std::vector< CWidgetManager::SMasterGroup > &_MasterGroups = getAllMasterGroup();
|
||||||
// If resolutions correctly setuped, and really different from new setup
|
// If resolutions correctly setuped, and really different from new setup
|
||||||
|
@ -2083,7 +2083,7 @@ namespace NLGUI
|
||||||
|
|
||||||
if (CInterfaceElement::getEditorMode())
|
if (CInterfaceElement::getEditorMode())
|
||||||
{
|
{
|
||||||
for( int i = 0; i < editorSelection.size(); i++ )
|
for(uint i = 0; i < editorSelection.size(); ++i)
|
||||||
{
|
{
|
||||||
CInterfaceElement *e = getElementFromId(editorSelection[i]);
|
CInterfaceElement *e = getElementFromId(editorSelection[i]);
|
||||||
if (e != NULL)
|
if (e != NULL)
|
||||||
|
@ -3376,8 +3376,8 @@ namespace NLGUI
|
||||||
void CWidgetManager::getEditorSelection( std::vector< std::string > &selection )
|
void CWidgetManager::getEditorSelection( std::vector< std::string > &selection )
|
||||||
{
|
{
|
||||||
selection.clear();
|
selection.clear();
|
||||||
for( int i = 0; i < editorSelection.size(); i++ )
|
for(uint i = 0; i < editorSelection.size(); ++i)
|
||||||
selection.push_back( editorSelection[ i ] );
|
selection.push_back(editorSelection[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CWidgetManager::selectWidget( const std::string &name )
|
void CWidgetManager::selectWidget( const std::string &name )
|
||||||
|
@ -3539,7 +3539,7 @@ namespace NLGUI
|
||||||
std::vector< CInterfaceElement* > elms;
|
std::vector< CInterfaceElement* > elms;
|
||||||
|
|
||||||
// Resolve the widget names
|
// Resolve the widget names
|
||||||
for( int i = 0; i < editorSelection.size(); i++ )
|
for(uint i = 0; i < editorSelection.size(); ++i)
|
||||||
{
|
{
|
||||||
CInterfaceElement *e = getElementFromId(editorSelection[i]);
|
CInterfaceElement *e = getElementFromId(editorSelection[i]);
|
||||||
if (e != NULL)
|
if (e != NULL)
|
||||||
|
@ -3562,7 +3562,7 @@ namespace NLGUI
|
||||||
std::string oldId;
|
std::string oldId;
|
||||||
|
|
||||||
// Reparent the widgets to the new group
|
// Reparent the widgets to the new group
|
||||||
for( int i = 0; i < elms.size(); i++ )
|
for(uint i = 0; i < elms.size(); ++i)
|
||||||
{
|
{
|
||||||
CInterfaceElement *e = elms[i];
|
CInterfaceElement *e = elms[i];
|
||||||
oldId = e->getId();
|
oldId = e->getId();
|
||||||
|
@ -3631,7 +3631,7 @@ namespace NLGUI
|
||||||
{
|
{
|
||||||
reset();
|
reset();
|
||||||
|
|
||||||
for( int i = 0; i < _MasterGroups.size(); i++ )
|
for(uint i = 0; i < _MasterGroups.size(); ++i)
|
||||||
delete _MasterGroups[i].Group;
|
delete _MasterGroups[i].Group;
|
||||||
_MasterGroups.clear();
|
_MasterGroups.clear();
|
||||||
|
|
||||||
|
|
|
@ -260,12 +260,13 @@ uint8 CBitmap::readGIF( NLMISC::IStream &f )
|
||||||
dstOffset+= dstChannels;
|
dstOffset+= dstChannels;
|
||||||
|
|
||||||
uint32 index = curFrame->RasterBits[srcOffset];
|
uint32 index = curFrame->RasterBits[srcOffset];
|
||||||
if (index != transparency)
|
|
||||||
|
if ((sint32)index != transparency)
|
||||||
{
|
{
|
||||||
// make sure color index is not outside colormap
|
// make sure color index is not outside colormap
|
||||||
if (ColorMap)
|
if (ColorMap)
|
||||||
{
|
{
|
||||||
if (index > ColorMap->ColorCount)
|
if ((sint)index > ColorMap->ColorCount)
|
||||||
{
|
{
|
||||||
index = 0;
|
index = 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue