示例#1
0
文件: Form.cpp 项目: dtbinh/Game3D
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;
}
示例#2
0
文件: Form.cpp 项目: 5guo/GamePlay
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;
}