diff --git a/src/edt/edt/edtInstPropertiesPage.cc b/src/edt/edt/edtInstPropertiesPage.cc index a76a0dd98..6bf78393d 100644 --- a/src/edt/edt/edtInstPropertiesPage.cc +++ b/src/edt/edt/edtInstPropertiesPage.cc @@ -159,7 +159,7 @@ InstPropertiesPage::display_mode_changed (bool) void InstPropertiesPage::back () { - m_index = m_selection_ptrs.size (); + m_index = (unsigned int) m_selection_ptrs.size (); } void diff --git a/src/edt/edt/edtMainService.cc b/src/edt/edt/edtMainService.cc index 0d98f3872..ce4f05a41 100644 --- a/src/edt/edt/edtMainService.cc +++ b/src/edt/edt/edtMainService.cc @@ -190,7 +190,7 @@ public: unsigned int size () const { - return m_common_inst.size (); + return (unsigned int) m_common_inst.size (); } unsigned int cv_index () const diff --git a/src/edt/edt/edtPropertiesPages.cc b/src/edt/edt/edtPropertiesPages.cc index c2e5610f3..2c9b7dc9e 100644 --- a/src/edt/edt/edtPropertiesPages.cc +++ b/src/edt/edt/edtPropertiesPages.cc @@ -73,7 +73,7 @@ ShapePropertiesPage::setup () void ShapePropertiesPage::back () { - m_index = m_selection_ptrs.size (); + m_index = (unsigned int) m_selection_ptrs.size (); } void diff --git a/src/edt/unit_tests/edtBasicTests.cc b/src/edt/unit_tests/edtBasicTests.cc index 0edc4e665..5e9eff146 100644 --- a/src/edt/unit_tests/edtBasicTests.cc +++ b/src/edt/unit_tests/edtBasicTests.cc @@ -25,6 +25,8 @@ TEST(1) { + EXPECT_EQ (1, 1); // avoids a compiler warning because of unreferenced _this + // TODO: add tests for edt specific things throw tl::CancelException (); // skip this test to indicate that there is nothing yet } diff --git a/src/laybasic/laybasic/layCellTreeModel.cc b/src/laybasic/laybasic/layCellTreeModel.cc index 73bccb00a..2ecb560ab 100644 --- a/src/laybasic/laybasic/layCellTreeModel.cc +++ b/src/laybasic/laybasic/layCellTreeModel.cc @@ -82,11 +82,11 @@ struct cmp_cell_tree_item_vs_name_f // -------------------------------------------------------------------- // CellTreeItem implementation -CellTreeItem::CellTreeItem (const db::Layout *layout, CellTreeItem *parent, bool is_pcell, size_t cell_index, bool flat, CellTreeModel::Sorting s) - : mp_layout (layout), mp_parent (parent), m_sorting (s), m_is_pcell (is_pcell), m_index (0), m_children (), m_cell_index (cell_index) +CellTreeItem::CellTreeItem (const db::Layout *layout, CellTreeItem *parent, bool is_pcell, size_t cell_or_pcell_index, bool flat, CellTreeModel::Sorting s) + : mp_layout (layout), mp_parent (parent), m_sorting (s), m_is_pcell (is_pcell), m_index (0), m_children (), m_cell_or_pcell_index (cell_or_pcell_index) { if (! flat && ! is_pcell) { - m_child_count = mp_layout->cell (m_cell_index).child_cells (); + m_child_count = int (mp_layout->cell (cell_index ()).child_cells ()); } else { m_child_count = 0; } @@ -105,8 +105,8 @@ CellTreeItem::display_text () const { if (m_is_pcell) { return name (); - } else if (mp_layout->is_valid_cell_index (m_cell_index)) { - return mp_layout->cell (m_cell_index).get_display_name (); + } else if (mp_layout->is_valid_cell_index (cell_index ())) { + return mp_layout->cell (cell_index ()).get_display_name (); } else { return std::string (); } @@ -125,7 +125,7 @@ CellTreeItem::child (int index) // create a list of child sub-item - const db::Cell *cell = & mp_layout->cell (m_cell_index); + const db::Cell *cell = & mp_layout->cell (cell_index ()); m_children.reserve (m_child_count); @@ -148,7 +148,7 @@ CellTreeItem::child (int index) db::cell_index_type CellTreeItem::cell_index () const { - return m_cell_index; + return db::cell_index_type (m_cell_or_pcell_index); } CellTreeItem * @@ -161,9 +161,9 @@ const char * CellTreeItem::name () const { if (! m_is_pcell) { - return mp_layout->cell_name (m_cell_index); + return mp_layout->cell_name (cell_index ()); } else { - return mp_layout->pcell_header (m_cell_index)->get_name ().c_str (); + return mp_layout->pcell_header (m_cell_or_pcell_index)->get_name ().c_str (); } } @@ -214,7 +214,7 @@ CellTreeItem::by_area_less_than (const CellTreeItem *b) const return m_is_pcell > b->is_pcell (); } // Hint: since mp_layout == b.mp_layout, not conversion to um^2 is required because of different DBU - return mp_layout->cell (m_cell_index).bbox ().area () < b->mp_layout->cell (b->m_cell_index).bbox ().area (); + return mp_layout->cell (cell_index ()).bbox ().area () < b->mp_layout->cell (b->cell_index ()).bbox ().area (); } bool @@ -224,7 +224,7 @@ CellTreeItem::by_area_equal_than (const CellTreeItem *b) const return false; } // Hint: since mp_layout == b.mp_layout, not conversion to um^2 is required because of different DBU - return mp_layout->cell (m_cell_index).bbox ().area () == b->mp_layout->cell (b->m_cell_index).bbox ().area (); + return mp_layout->cell (cell_index ()).bbox ().area () == b->mp_layout->cell (b->cell_index ()).bbox ().area (); } // -------------------------------------------------------------------- diff --git a/src/laybasic/laybasic/layCellTreeModel.h b/src/laybasic/laybasic/layCellTreeModel.h index 7a892545d..e9c0afa9f 100644 --- a/src/laybasic/laybasic/layCellTreeModel.h +++ b/src/laybasic/laybasic/layCellTreeModel.h @@ -241,7 +241,7 @@ private: class CellTreeItem { public: - CellTreeItem (const db::Layout *layout, CellTreeItem *parent, bool is_pcell, size_t cell_index, bool flat, CellTreeModel::Sorting sorting); + CellTreeItem (const db::Layout *layout, CellTreeItem *parent, bool is_pcell, size_t cell_or_pcell_index, bool flat, CellTreeModel::Sorting sorting); ~CellTreeItem (); int children () const; @@ -279,7 +279,7 @@ private: size_t m_index; std::vector m_children; int m_child_count; - size_t m_cell_index; + size_t m_cell_or_pcell_index; const char *name () const; }; diff --git a/src/laybasic/laybasic/layColorPalette.cc b/src/laybasic/laybasic/layColorPalette.cc index c6a09b7b7..3330dbe89 100644 --- a/src/laybasic/laybasic/layColorPalette.cc +++ b/src/laybasic/laybasic/layColorPalette.cc @@ -124,7 +124,7 @@ ColorPalette::color_by_index (unsigned int n) const unsigned int ColorPalette::colors () const { - return m_colors.size (); + return (unsigned int) m_colors.size (); } unsigned int @@ -136,7 +136,7 @@ ColorPalette::luminous_color_index_by_index (unsigned int n) const unsigned int ColorPalette::luminous_colors () const { - return m_luminous_color_indices.size (); + return (unsigned int) m_luminous_color_indices.size (); } void diff --git a/src/laybasic/laybasic/layGridNet.cc b/src/laybasic/laybasic/layGridNet.cc index b7428c6f5..be3b4a7e4 100644 --- a/src/laybasic/laybasic/layGridNet.cc +++ b/src/laybasic/laybasic/layGridNet.cc @@ -326,9 +326,9 @@ public: int x = p.x (), y = p.y (); if (halign < 0) { - x -= ff.width () * strlen (t); + x -= ff.width () * int (strlen (t)); } else if (halign == 0) { - x -= ff.width () * strlen (t) / 2; + x -= ff.width () * int (strlen (t)) / 2; } if (valign < 0) { diff --git a/src/laybasic/laybasic/layLineStylePalette.cc b/src/laybasic/laybasic/layLineStylePalette.cc index 19ba0fc1e..a73c65780 100644 --- a/src/laybasic/laybasic/layLineStylePalette.cc +++ b/src/laybasic/laybasic/layLineStylePalette.cc @@ -89,7 +89,7 @@ LineStylePalette::style_by_index (unsigned int n) const unsigned int LineStylePalette::styles () const { - return m_styles.size (); + return (unsigned int) m_styles.size (); } void diff --git a/src/lib/unit_tests/libBasicTests.cc b/src/lib/unit_tests/libBasicTests.cc index 4da3386a7..249c74ccb 100644 --- a/src/lib/unit_tests/libBasicTests.cc +++ b/src/lib/unit_tests/libBasicTests.cc @@ -25,6 +25,8 @@ TEST(1) { + EXPECT_EQ (1, 1); // avoids a compiler warning because of unreferenced _this + // TODO: add tests for lib specific things throw tl::CancelException (); // skip this test to indicate that there is nothing yet } diff --git a/src/lym/unit_tests/lymBasicTests.cc b/src/lym/unit_tests/lymBasicTests.cc index e027ccbd5..b230abb9a 100644 --- a/src/lym/unit_tests/lymBasicTests.cc +++ b/src/lym/unit_tests/lymBasicTests.cc @@ -25,6 +25,8 @@ TEST(1) { + EXPECT_EQ (1, 1); // avoids a compiler warning because of unreferenced _this + // TODO: add tests for lym specific things throw tl::CancelException (); // skip this test to indicate that there is nothing yet }