static bool shouldLinkArch(SmallVectorImpl<StringRef> &Archs, StringRef Arch) { if (Archs.empty() || is_contained(Archs, "all") || is_contained(Archs, "*")) return true; if (Arch.startswith("arm") && Arch != "arm64" && is_contained(Archs, "arm")) return true; SmallString<16> ArchName = Arch; if (Arch.startswith("thumb")) ArchName = ("arm" + Arch.substr(5)).str(); return is_contained(Archs, ArchName); }
void fancy_set::delete_element(INT elt) { if (is_contained(elt)) { swap(k - 1, elt); k--; } }
void fancy_set::add_element(INT elt) { if (!is_contained(elt)) { swap(k, elt); k++; } }
data_type& get_cell(const Point& point) { BOOST_CONCEPT_ASSERT(( Point2DConcept<Point> )); GEOMETRIX_ASSERT( is_contained( point ) ); boost::uint32_t i = m_gridTraits.get_x_index(get<0>(point)); boost::uint32_t j = m_gridTraits.get_y_index(get<1>(point)); return get_cell(i,j); }
void fancy_set::delete_elements(INT *elts, INT nb) { INT i; for (i = 0; i < nb; i++) { if (is_contained(elts[i])) { swap(k - 1, elts[i]); k--; } } }
void fancy_set::intersect_with(INT *elts, INT nb) { INT i, l; l = 0; for (i = 0; i < nb; i++) { if (is_contained(elts[i])) { swap(l, elts[i]); l++; } } k = l; }
void fancy_set::select_subset(INT *elts, INT nb) { INT i; for (i = 0; i < nb; i++) { if (!is_contained(elts[i])) { cout << "fancy_set::select_subset element is not contained" << endl; exit(1); } swap(i, elts[i]); } k = nb; }
// ----------------------------------------------------------------------- // find window from screen coordinates // ----------------------------------------------------------------------- t_window* t_button::get_child( t_screen_point point, bool ignore_visibility ) // find window from client coordinates { if (!is_visible() && !ignore_visibility) return 0; if (!is_contained( point )) return 0; t_window_list::const_reverse_iterator it; t_window* result; t_screen_point screen_point = to_screen( point ); // Since we passed the "is_contained" test, we're pretty sure we'll find // something. That being the case, we're willing to spend the time to check // for a visible hit first, then fallback to a hit on an invisible child. // If we needed to speed things up we could just do the "ignore" test right // off and put up with possibility of getting an invisible child when a visible // one was available. for (it = get_children_rbegin(); it != get_children_rend(); it++) { result = (*it)->get_child( (*it)->to_client( screen_point ), false ); if (result != 0) return result; } // Now look for an invisible hit for (it = get_children_rbegin(); it != get_children_rend(); it++) { result = (*it)->get_child( (*it)->to_client( screen_point ), true ); if (result != 0) return result; } // I'm not sure we'll ever get here given the way is_contained is implemented // and the fact that we checked that first off, but just in case... if (m_has_transparency == k_completely_transparent) return 0; return this; }
void fancy_set::subtract_set(fancy_set *set_to_subtract) { INT i, a; if (k < set_to_subtract->k) { for (i = 0; i < k; i++) { a = set[i]; if (set_to_subtract->is_contained(a)) { swap(k - 1, a); k--; i--; // do the current position one more time } } } else { for (i = 0; i < set_to_subtract->k; i++) { a = set_to_subtract->set[i]; if (is_contained(a)) { swap(k - 1, a); k--; } } } }