From 577dee52919ecbe6f521849d447fba6212a8db2b Mon Sep 17 00:00:00 2001 From: Jack Andersen Date: Wed, 30 Dec 2015 18:55:29 -1000 Subject: [PATCH 1/2] Silence warning --- specter/lib/Toolbar.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/specter/lib/Toolbar.cpp b/specter/lib/Toolbar.cpp index 06b10861f..bf86a2438 100644 --- a/specter/lib/Toolbar.cpp +++ b/specter/lib/Toolbar.cpp @@ -13,10 +13,10 @@ void Toolbar::Resources::init(boo::IGraphicsDataFactory* factory, const ThemeDat { static const Zeus::RGBA32 tex[] = { - {255,255,255,64}, - {255,255,255,64}, - {0,0,0,64}, - {0,0,0,64} + {{255,255,255,64}}, + {{255,255,255,64}}, + {{0,0,0,64}}, + {{0,0,0,64}} }; m_shadingTex = factory->newStaticTexture(4, 1, 1, boo::TextureFormat::RGBA8, tex, 16); } From c40079646db6fd99f865aa200db0310c13cf88fa Mon Sep 17 00:00:00 2001 From: Jack Andersen Date: Wed, 30 Dec 2015 20:37:32 -1000 Subject: [PATCH 2/2] Initialization fix --- specter/lib/Table.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/specter/lib/Table.cpp b/specter/lib/Table.cpp index 49773032c..a5ee58c6a 100644 --- a/specter/lib/Table.cpp +++ b/specter/lib/Table.cpp @@ -73,11 +73,11 @@ void Table::RowsView::_setRowVerts(const boo::SWindowRect& sub, const boo::SWind int startIdx = std::max(0, int(m_t.m_rows) - idx); size_t r, c; - for (r=0 ; r= scissor.location[1] ; ++r) + for (r=0, c=0 ; r= scissor.location[1] ; ++r) { const Zeus::CColor& color = (r&1) ? theme.tableCellBg1() : theme.tableCellBg2(); int xOff = 0; - for (c=0 ; cload(m_verts, sizeof(SolidShaderVert) * 6 * r * c); + if (r * c) + m_vertsBuf->load(m_verts, sizeof(SolidShaderVert) * 6 * r * c); } void Table::setMultiplyColor(const Zeus::CColor& color)