コード例 #1
0
ファイル: cellstore.cpp プロジェクト: HedgehogGrandpa/openmw
    bool CellStore::hasId (const std::string& id) const
    {
        if (mState==State_Unloaded)
            return false;

        if (mState==State_Preloaded)
            return std::binary_search (mIds.begin(), mIds.end(), id);

        return searchConst (id).isEmpty();
    }
コード例 #2
0
ファイル: code_fact.c プロジェクト: GSIO01/CI_PL0
int fa1(void) {
    constant_p c = searchConst(morph.value.numb);

    DEBUG_PRINT("fa1");

    if(c == NULL) {
        c = createConst(morph.value.numb);
    }


    if(code(puConst, c->index) == FAIL) {
        error(ERR_CODEGEN, NULL);
        return FAIL;
    }

    return OK;
}