Fixed compiler warnings

presentation
Andreas Butti 7 years ago
parent 38aaa55840
commit 7409b09864
  1. 7
      src/gui/sidebar/previews/layer/SidebarPreviewLayerEntry.cpp
  2. 2
      src/gui/sidebar/previews/layer/SidebarPreviewLayers.cpp
  3. 2
      src/gui/toolbarMenubar/ToolPageLayer.cpp
  4. 6
      src/model/XojPage.cpp

@ -8,13 +8,14 @@
SidebarPreviewLayerEntry::SidebarPreviewLayerEntry(SidebarPreviewBase* sidebar, PageRef page, int layer, size_t index)
: SidebarPreviewBaseEntry(sidebar, page),
box(gtk_box_new(GTK_ORIENTATION_VERTICAL, 2)),
toolbarHeight(0),
index(index),
layer(layer),
toolbarHeight(0),
box(gtk_box_new(GTK_ORIENTATION_VERTICAL, 2)),
cbVisible(NULL),
inUpdate(false)
{
XOJ_INIT_TYPE(SidebarPreviewLayerEntry);
this->layer = layer;
GtkWidget* toolbar = gtk_box_new(GTK_ORIENTATION_HORIZONTAL,6);

@ -142,7 +142,7 @@ void SidebarPreviewLayers::layerVisibilityChanged()
return;
}
for (int i = 0; i < this->previews.size(); i++)
for (int i = 0; i < (int)this->previews.size(); i++)
{
SidebarPreviewLayerEntry* sp = (SidebarPreviewLayerEntry*)this->previews[this->previews.size() - i - 1];
sp->setVisibleCheckbox(p->isLayerVisible(i));

@ -155,7 +155,7 @@ void ToolPageLayer::layerMenuClicked(GtkWidget* menu)
if (!gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(menu)))
{
if (layerId == lc->getCurrentLayerId())
if (layerId == (int)lc->getCurrentLayerId())
{
// This is the current layer, don't allow to deselect it
inMenuUpdate = true;

@ -83,7 +83,7 @@ void XojPage::insertLayer(Layer* layer, int index)
{
XOJ_CHECK_TYPE(XojPage);
if (index >= this->layer.size())
if (index >= (int)this->layer.size())
{
addLayer(layer);
return;
@ -158,7 +158,7 @@ void XojPage::setLayerVisible(int layerId, bool visible)
}
layerId--;
if (layerId >= this->layer.size())
if (layerId >= (int)this->layer.size())
{
return;
}
@ -181,7 +181,7 @@ bool XojPage::isLayerVisible(int layerId)
}
layerId--;
if (layerId >= this->layer.size())
if (layerId >= (int)this->layer.size())
{
return false;
}

Loading…
Cancel
Save