本文整理汇总了C++中Clean函数的典型用法代码示例。如果您正苦于以下问题:C++ Clean函数的具体用法?C++ Clean怎么用?C++ Clean使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了Clean函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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);
}
开发者ID:Kubink,项目名称:vlc,代码行数:10,代码来源:wingdi.c
示例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 );
}
开发者ID:371816210,项目名称:vlc_vlc,代码行数:13,代码来源:swscale.c
示例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);
}
}
开发者ID:Foozle303,项目名称:xbmc,代码行数:11,代码来源:DVDPlayerAudioResampler.cpp
示例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];
}
}
开发者ID:Tyf0n,项目名称:Rar_crack,代码行数:22,代码来源:rs.cpp
示例5: Clean
OpenSSL_Mgr::~OpenSSL_Mgr(void)
{
try
{
Clean();
}
catch(...)
{
}
}//lint !e1579
开发者ID:eSDK,项目名称:esdk_elte,代码行数:11,代码来源:OpenSSL_Mgr.cpp
示例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;
}
}
开发者ID:ZHENG80,项目名称:PolyUCourseworks,代码行数:11,代码来源:scheduleModule.c
示例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( );
}
}
开发者ID:TheDgtl,项目名称:osrose-droprev,代码行数:11,代码来源:CRoseArray.hpp
示例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;
}
开发者ID:wheresjames,项目名称:rumfc,代码行数:11,代码来源:DrawGraph.cpp
示例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();//则清空队列
}
开发者ID:neoguojing,项目名称:neolibs,代码行数:11,代码来源:neoqueue.cpp
示例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;
}
开发者ID:jbowren,项目名称:SimpleMLP,代码行数:41,代码来源:Application.cpp
示例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;
}
}
开发者ID:d2armory,项目名称:flare,代码行数:12,代码来源:kvreader2.cpp
示例12: TRSCOPE
qPBReaderEpub::~qPBReaderEpub()
{
TRSCOPE(epub, "qPBReaderEpub::~qPBReaderEpub");
Clean();
if (_pCurrentOpf)
{
delete _pCurrentOpf;
_pCurrentOpf = 0;
}
}
开发者ID:m4mmon,项目名称:qPBReader,代码行数:12,代码来源:qPBReaderEpub.cpp
示例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;
}
开发者ID:cdaffara,项目名称:symbiandump-os1,代码行数:18,代码来源:CPhCltBaseImageParams.cpp
示例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;
}
开发者ID:Fissuras,项目名称:videoventure,代码行数:13,代码来源:MemoryPool.cpp
示例15: Clean
KLString& KLString::operator= (KLString&& String)
{
Clean();
Data = String.Data;
Capacity = String.Capacity;
String.Data = nullptr;
return *this;
}
开发者ID:Kuszki,项目名称:KLLibs,代码行数:12,代码来源:klstring.cpp
示例16: CreateGraph
void AStar::Run()
{
CreateGraph();
CreateGraphAdjs();
ComputeGraphHeuristics();
Search();
Clean();
}
开发者ID:Bifido,项目名称:IAProgramming,代码行数:12,代码来源:AStar.cpp
示例17: QWidget
mSimpleDrawer::mSimpleDrawer(QWidget *parent):
QWidget(parent),
xMax(10), xMin(-10),
yMax(10), yMin(-10)
{
label = new QLabel(this);
label->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
label->resize(size());
pixMap = new QPixmap(this->size());
Clean();
}
开发者ID:benEnsta,项目名称:mSimpleDrawer,代码行数:12,代码来源:msimpledrawer.cpp
示例18: SoundEnergyLowPassFilter
//------------------------------------------------------
// The processing drive
// it does not include collecting SoundEnergy, but contains all other steps to extract Rhythmic at run time
//------------------------------------------------------
void RhythmicExtract::RhythmicProcessingDrive(){
SoundEnergyLowPassFilter(); //produce raw low passed curve
if(lowPassedSoundEnergy.size() > 0){ //float check to make sure the size is non-zero
SoundEnergyStatisticAnalysis(); //produce average, variance and standard deviation in 3 levels
SoundEnergyBeatFirstExtraction();
SoundEnergyBeatSecondExtraction();
//SoundEnergyIterativePeriodicMatch();
Clean();
}
}
开发者ID:GritBear,项目名称:MuSee,代码行数:16,代码来源:RhythmicExtract.cpp
示例19: Clean
bool BitmapFont::LoadBitmap(const std::string& filename)
{
Clean();
if(m_texture == nullptr)
{
m_texture = new Texture();
m_texture->LoadFromFile(filename);
}
return true;
}
开发者ID:pavelsimo,项目名称:Pong,代码行数:12,代码来源:BitmapFont.cpp
示例20: defined
bool SockSpray::HandleBind(SockPoller *binder)
{
bool result = false;
#if defined(LNE_WIN32)
DWORD bytes;
unsigned long value = 1;
GUID guid = WSAID_DISCONNECTEX;
if(WSAIoctl(skpad_.socket(), SIO_GET_EXTENSION_FUNCTION_POINTER, &guid, sizeof(guid), &iocp_data_.disconnectex, sizeof(iocp_data_.disconnectex), &bytes, NULL, NULL) == 0
&& ioctlsocket(skpad_.socket(), FIONBIO, &value) == 0) {
#else
int flags = fcntl(skpad_.socket(), F_GETFL);
if(flags >= 0 && fcntl(skpad_.socket(), F_SETFL, flags | O_NONBLOCK) == 0) {
#endif
set_poller(binder);
#if defined(LNE_WIN32)
if(CreateIoCompletionPort(reinterpret_cast<HANDLE>(skpad_.socket()), poller()->Handle(), static_cast<ULONG_PTR>(skpad_.socket()), 0) != NULL) {
iocp_lock_.Lock();
DWORD bytes, flags = 0;
int rc = WSARecv(skpad_.socket(), &iocp_data_.buffer, 1, &bytes, &flags, &iocp_data_.overlap[IOCP_READ], NULL);
if(rc != SOCKET_ERROR || WSAGetLastError() == ERROR_IO_PENDING) {
++iocp_data_.count;
result = true;
}
iocp_lock_.Unlock();
}
#elif defined(LNE_LINUX)
if(epoll_ctl(poller()->Handle(), EPOLL_CTL_ADD, skpad_.socket(), &epoll_data_) == 0)
result = true;
#elif defined(LNE_FREEBSD)
struct kevent kev[2];
EV_SET(&kev[0], skpad_.socket(), EVFILT_READ, EV_ADD | EV_DISABLE | EV_CLEAR, 0, 0, static_cast<SockEventer *>(this));
EV_SET(&kev[1], skpad_.socket(), EVFILT_WRITE, EV_ADD | EV_DISABLE | EV_CLEAR, 0, 0, static_cast<SockEventer *>(this));
if(kevent(poller()->Handle(), kev, 2, NULL, 0, NULL) == 0) {
kevent_data_.num_eof = 1;
EV_SET(&kev[0], skpad_.socket(), EVFILT_READ, EV_ENABLE, 0, 0, static_cast<SockEventer *>(this));
EV_SET(&kev[1], skpad_.socket(), EVFILT_WRITE, EV_ENABLE, 0, 0, static_cast<SockEventer *>(this));
kevent(poller()->Handle(), kev, 2, NULL, 0, NULL);
result = true;
}
#endif
}
if(!result)
Clean();
return result;
}
void SockSpray::HandleTerminate(void)
{
__Shutdown();
handler_->HandleTerminate(this);
Release();
}
开发者ID:breezechen,项目名称:lne,代码行数:52,代码来源:SockSpray.cpp
注:本文中的Clean函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论