Example #1
0
RBTree *RBTreeNew(void *(*KeyCopy)(const void *key),
                  int (*KeyCompare)(const void *a, const void *b),
                  void (*KeyDestroy)(void *key),
                  void *(*ValueCopy)(const void *key),
                  int (*ValueCompare)(const void *a, const void *b),
                  void (*ValueDestroy)(void *key))
{
    assert(!(KeyCopy && KeyDestroy) || (KeyCopy && KeyDestroy));
    assert(!(ValueCopy && ValueDestroy) || (ValueCopy && ValueDestroy));

    RBTree *t = xmalloc(sizeof(RBTree));

    t->KeyCopy = KeyCopy ? KeyCopy : NoopCopy_;
    t->KeyCompare = KeyCompare ? KeyCompare : PointerCompare_;
    t->KeyDestroy = KeyDestroy ? KeyDestroy : NoopDestroy_;

    t->ValueCopy = ValueCopy ? ValueCopy : NoopCopy_;
    t->ValueCompare = ValueCompare ? ValueCompare : PointerCompare_;
    t->ValueDestroy = ValueDestroy ? ValueDestroy : NoopDestroy_;

    t->nil = xcalloc(1, sizeof(RBNode));
    t->root = xcalloc(1, sizeof(RBNode));

    Reset_(t);

    return t;
}
Example #2
0
 LinearInterpUpsampler::LinearInterpUpsampler(uint8_t nUpsamp, uint8_t nChan, bool bMinGroupDelay) :
     m_nUpsamp(nUpsamp),
     m_nChan(nChan),
     m_bMinDelay(bMinGroupDelay)
 {
     Reset_();
 }
Example #3
0
void RBTreeClear(RBTree *tree)
{
    assert(tree);

    ClearRecursive_(tree, tree->root);
    tree->root = xcalloc(1, sizeof(RBNode));

    Reset_(tree);
}
Example #4
0
void
TexC::Init( RegalContext& ctx )
{
  RegalContext* sharingWith = ctx.groupInitializedContext();
  if ( sharingWith != NULL ) {
    mapTextureToTextureState = sharingWith->texc->mapTextureToTextureState;
  }

  Reset_();
}
Example #5
0
void CPreventDefuseTask::Reset(void)
{
	Reset_();
}
Example #6
0
void CCareerTask::Reset(void)
{
	Reset_();
}
Example #7
0
//=============================================================================
// reset
//=============================================================================
void Action::Reset(void)
{
	is_end_ = false;
	time_count_ = 0;
	Reset_();
}
Example #8
0
TexC::TexC()
{
  Reset_();
}