Exemple #1
0
void wxIndividualLayoutConstraint::Set(wxRelationship rel, wxWindowBase *otherW, wxEdge otherE, int val, int marg)
{
    if (rel == wxSameAs)
    {
        // If Set is called by the user with wxSameAs then call SameAs to do
        // it since it will actually use wxPercent instead.
        SameAs(otherW, otherE, marg);
        return;
    }

    relationship = rel;
    otherWin = otherW;
    otherEdge = otherE;

    if ( rel == wxPercentOf )
    {
        percent = val;
    }
    else
    {
        value = val;
    }

    margin = marg;
}
Exemple #2
0
void cc::check_arg_types(sym::MonoFn* fn, const ast::ArgList& args) {
  for (uint i = 0; i < fn->params.size(); ++i) {
    auto arg_type = args[i]->Type();
    auto param = fn->params[i];

    if (!arg_type.SameAs(param.type)) {
      throw err::FnCallArgType{fn->name, param, arg_type};
    }
  }
}