Form* Form::getForm(const char* id) { for (size_t i = 0, size = __forms.size(); i < size; ++i) { Form* f = __forms[i]; GP_ASSERT(f); if (strcmp(id, f->getId()) == 0) { return f; } } return NULL; }
Form* Form::getForm(const char* id) { std::vector<Form*>::const_iterator it; for (it = __forms.begin(); it < __forms.end(); ++it) { Form* f = *it; GP_ASSERT(f); if (strcmp(id, f->getId()) == 0) { return f; } } return NULL; }