本文整理汇总了C++中Clean函数的典型用法代码示例。如果您正苦于以下问题:C++ Clean函数的具体用法?C++ Clean怎么用?C++ Clean使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了Clean函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Close
static void Close(vlc_object_t *object)
{
vout_display_t *vd = (vout_display_t *)object;
Clean(vd);
CommonClean(vd);
free(vd->sys);
}
示例2: CloseScaler
/*****************************************************************************
* CloseFilter: clean up the filter
*****************************************************************************/
static void CloseScaler( vlc_object_t *p_this )
{
filter_t *p_filter = (filter_t*)p_this;
filter_sys_t *p_sys = p_filter->p_sys;
Clean( p_filter );
if( p_sys->p_src_filter )
sws_freeFilter( p_sys->p_src_filter );
free( p_sys );
}
示例3: Clean
void CDVDPlayerResampler::CheckResampleBuffers(int channels)
{
int error;
if (channels != m_nrchannels)
{
Clean();
m_nrchannels = channels;
m_converter = src_new(m_quality, m_nrchannels, &error);
}
}
示例4: g
// Create the generator polynomial g(x).
// g(x)=(x-a)(x-a^2)(x-a^3)..(x-a^N)
void RSCoder::pnInit()
{
int p2[MAXPAR + 1]; // Currently calculated part of g(x).
Clean(p2, ParSize);
p2[0] = 1; // Set p2 polynomial to 1.
for (int I = 1; I <= ParSize; I++)
{
int p1[MAXPAR + 1]; // We use p1 as current (x+a^i) expression.
Clean(p1, ParSize);
p1[0] = gfExp[I];
p1[1] = 1; // Set p1 polynomial to x+a^i.
// Multiply the already calucated part of g(x) to next (x+a^i).
pnMult(p1, p2, GXPol);
// p2=g(x).
for (int J = 0; J < ParSize; J++)
p2[J] = GXPol[J];
}
}
示例5: Clean
OpenSSL_Mgr::~OpenSSL_Mgr(void)
{
try
{
Clean();
}
catch(...)
{
}
}//lint !e1579
示例6: SchdFcfs
void SchdFcfs(Record* rd) {
Clean();
Record* cur = rd;
while (cur->next != NULL) {
cur = cur->next;
if (IsAvailable(cur)) {
Book(cur);
cur->accept = 1;
} else cur->accept = 0;
}
}
示例7: CRoseArray
CRoseArray( CARRAY_SIZE arrsize )
{
this->arr = NULL;
this->arraysize = 0;
this->arr = new T[arrsize];
if( this->arr != NULL )
{
this->arraysize = arrsize;
Clean( );
}
}
示例8: Clean
BOOL CDrawGraph::Tick(DWORD dwTick)
{
// Save tick count
if ( dwTick == 0 ) m_dwTime = GetTickCount();
else m_dwTime = dwTick;
// Clean up the list
Clean();
return TRUE;
}
示例9: Set
CNEOPopBuffer::CNEOPopBuffer(char *szBuffer, //缓冲区指针
int nBufferSize, //缓冲区尺寸
bool bInitFlag) //是否初始化标志
{
m_pHead=NULL;
m_pBuffer=NULL;
m_nBufferSize=nBufferSize;
Set(szBuffer,nBufferSize);
if(bInitFlag)//需要初始化
Clean();//则清空队列
}
示例10: printf
bool Application::LoadData(Utils::Image* imgSet[], int imageCount, bool isTraining)
{
char resource[33];
int currentIndex = 0;
for (int x = 0; x < Utils::SUBJECT_COUNT; x++)
{
for (int y = 0; y < imageCount; y++)
{
char letter = x + Utils::CHAR_OFFSET;
if (isTraining)
std::sprintf(&resource[0], Utils::RESOURCE_STRING, letter, y);
else
std::sprintf(&resource[0], Utils::RESOURCE_STRING, letter, y + Utils::TRAINING_IMAGES_PER_SUBJECT);
currentIndex = (x * imageCount) + y;
imgSet[currentIndex] = Utils::LoadImage(resource);
if (!imgSet[currentIndex])
{
printf(Utils::ERROR_BEGIN);
printf(Utils::ERROR_PROBLEM_LOADING);
Clean();
return false;
}
if (imgSet[currentIndex]->height != Utils::IMAGE_HEIGHT && imgSet[currentIndex]->width != Utils::IMAGE_WIDTH)
{
printf(Utils::ERROR_BEGIN);
printf(Utils::ERROR_WRONG_DIMENSIONS);
Clean();
return false;
}
if (imgSet[currentIndex]->colorFormat != PNG_COLOR_TYPE_GRAY)
{
printf(Utils::ERROR_BEGIN);
printf(Utils::ERROR_WRONG_FORMAT);
Clean();
return false;
}
}
}
return true;
}
示例11: while
void KVReader2::Clean(KeyValue* pData)
{
// Recursively delete node
KeyValue* cur = pData;
while(cur!=0)
{
Clean(cur->child);
KeyValue* tmp = cur->sibling;
delete cur;
cur = tmp;
}
}
示例12: TRSCOPE
qPBReaderEpub::~qPBReaderEpub()
{
TRSCOPE(epub, "qPBReaderEpub::~qPBReaderEpub");
Clean();
if (_pCurrentOpf)
{
delete _pCurrentOpf;
_pCurrentOpf = 0;
}
}
示例13: Clean
// -----------------------------------------------------------------------------
// CPhCltBaseImageParams::operator=
//
// Assignment operator.
// -----------------------------------------------------------------------------
//
CPhCltBaseImageParams& CPhCltBaseImageParams::
operator=( const CPhCltBaseImageParams& aParamClass )
{
Clean();
this->iImages().iType = aParamClass.iImages().iType;
this->iImages().iImageCount = aParamClass.iImages().iImageCount;
for ( TInt i = 0; i < KPhCltImagesArrayLen; i++ )
{
iImages().iImages[ i ] = aParamClass.iImages().iImages[ i ];
}
return *this;
}
示例14: Clean
// setup
void MemoryPool::Setup(size_t aSize, size_t aStart, size_t aGrow, size_t aAlign)
{
// invalidate the pool
Clean();
// update properties
// (and ensure a block is large enough to hold a freelist node)
mSize = std::max(sizeof(void *), (aSize + aAlign - 1) & ~(aAlign - 1));
mStart = aStart;
mGrow = aGrow;
mAlign = aAlign;
}
示例15: Clean
KLString& KLString::operator= (KLString&& String)
{
Clean();
Data = String.Data;
Capacity = String.Capacity;
String.Data = nullptr;
return *this;
}