War on -Werror, part 14: More hodgepodge.

This commit is contained in:
Jason Felds
2012-12-27 12:45:04 -05:00
parent 52df8ea981
commit a15cbc431d
36 changed files with 68 additions and 68 deletions
+1 -1
View File
@@ -146,7 +146,7 @@ void ActorFrame::AddChild( Actor *pActor )
Dialog::OK( ssprintf("Actor \"%s\" adds child \"%s\" more than once", GetLineage().c_str(), pActor->GetName().c_str()) );
#endif
ASSERT( pActor );
ASSERT( pActor != NULL );
ASSERT( (void*)pActor != (void*)0xC0000005 );
m_SubActors.push_back( pActor );
+1 -1
View File
@@ -104,7 +104,7 @@ retry:
Actor* ActorUtil::LoadFromNode( const XNode* pNode, Actor *pParentActor )
{
ASSERT( pNode );
ASSERT( pNode != NULL );
// Remove this in favor of using conditionals in Lua. -Chris
// There are a number of themes out there that depend on this (including
+1 -1
View File
@@ -50,7 +50,7 @@ void BGAnimation::AddLayersFromAniDir( const RString &_sAniDir, const XNode *pNo
{
const RString &sLayer = *s;
const XNode* pKey = pNode->GetChild( sLayer );
ASSERT( pKey );
ASSERT( pKey != NULL );
RString sImportDir;
if( pKey->GetAttrValue("Import", sImportDir) )
+3 -3
View File
@@ -203,7 +203,7 @@ struct BannerTexture: public RageTexture
void Create()
{
ASSERT( m_pImage );
ASSERT( m_pImage != NULL );
/* The image is preprocessed; do as little work as possible. */
@@ -239,7 +239,7 @@ struct BannerTexture: public RageTexture
ASSERT( DISPLAY->SupportsTextureFormat(pf) );
ASSERT(m_pImage);
ASSERT(m_pImage != NULL);
m_uTexHandle = DISPLAY->CreateTexture( pf, m_pImage, false );
CreateFrameRects();
@@ -290,7 +290,7 @@ RageTextureID BannerCache::LoadCachedBanner( RString sBannerPath )
* when converting; this way, the conversion will end up in the map so we
* only have to convert once. */
RageSurface *&pImage = g_BannerPathToImage[sBannerPath];
ASSERT( pImage );
ASSERT( pImage != NULL );
int iSourceWidth = 0, iSourceHeight = 0;
BannerData.GetValue( sBannerPath, "Width", iSourceWidth );
+3 -3
View File
@@ -363,7 +363,7 @@ void BitmapText::DrawChars( bool bUseStrokeTexture )
* in sAlternateText, too, just use sText. */
void BitmapText::SetText( const RString& _sText, const RString& _sAlternateText, int iWrapWidthPixels )
{
ASSERT( m_pFont );
ASSERT( m_pFont != NULL );
RString sNewText = StringWillUseAlternate(_sText,_sAlternateText) ? _sAlternateText : _sText;
@@ -505,7 +505,7 @@ void BitmapText::UpdateBaseZoom()
bool BitmapText::StringWillUseAlternate( const RString& sText, const RString& sAlternateText ) const
{
ASSERT( m_pFont );
ASSERT( m_pFont != NULL );
// Can't use the alternate if there isn't one.
if( !sAlternateText.size() )
@@ -711,7 +711,7 @@ void BitmapText::SetHorizAlign( float f )
void BitmapText::SetWrapWidthPixels( int iWrapWidthPixels )
{
ASSERT( m_pFont ); // always load a font first
ASSERT( m_pFont != NULL ); // always load a font first
if( m_iWrapWidthPixels == iWrapWidthPixels )
return;
m_iWrapWidthPixels = iWrapWidthPixels;
+1 -1
View File
@@ -346,7 +346,7 @@ void Font::CapsOnly()
void Font::SetDefaultGlyph( FontPage *pPage )
{
ASSERT( pPage );
ASSERT( pPage != NULL );
ASSERT( !pPage->m_aGlyphs.empty() );
m_pDefault = pPage;
}
+1 -1
View File
@@ -410,7 +410,7 @@ int MusicThread_start( void *p )
GameSoundManager::GameSoundManager()
{
/* Init RageSoundMan first: */
ASSERT( SOUNDMAN );
ASSERT( SOUNDMAN != NULL );
g_Mutex = new RageEvent("GameSoundManager");
g_Playing = new MusicPlaying( new RageSound );
+2 -2
View File
@@ -243,7 +243,7 @@ LuaManager::LuaManager()
LUA = this; // so that LUA is available when we call the Register functions
lua_State *L = lua_open();
ASSERT( L );
ASSERT( L != NULL );
lua_atpanic( L, LuaPanic );
m_pLuaMain = L;
@@ -478,7 +478,7 @@ int LuaThreadVariable::AdjustCount( lua_State *L, int iAdd )
ASSERT( lua_istable(L, -1) );
lua_rawgeti( L, -1, 0 );
ASSERT( lua_isnumber(L, -1) );
ASSERT( lua_isnumber(L, -1) != 0 );
int iCount = lua_tointeger( L, -1 );
lua_pop( L, 1 );
+1 -1
View File
@@ -402,7 +402,7 @@ void NoteDataUtil::GetSMNoteDataString( const NoteData &in, RString &sRet )
case TapNote::lift: c = 'L'; break;
case TapNote::fake: c = 'F'; break;
default:
FAIL_M( ssprintf("tn %i", tn.type) ); // invalid enum value
c = '\0'; FAIL_M( ssprintf("tn %i", tn.type) ); // invalid enum value
}
sRet.append( 1, c );
+1 -1
View File
@@ -40,7 +40,7 @@ void IPreference::LoadAllDefaults()
void IPreference::ReadAllPrefsFromNode( const XNode* pNode, bool bIsStatic )
{
ASSERT( pNode );
ASSERT( pNode != NULL );
FOREACHS_CONST( IPreference*, *m_Subscribers.m_pSubscribers, p )
(*p)->ReadFrom( pNode, bIsStatic );
}
+1 -1
View File
@@ -1208,7 +1208,7 @@ void RageDisplay_D3D::SetZTestMode( ZTestMode mode )
case ZTEST_OFF: dw = D3DCMP_ALWAYS; break;
case ZTEST_WRITE_ON_PASS: dw = D3DCMP_LESSEQUAL; break;
case ZTEST_WRITE_ON_FAIL: dw = D3DCMP_GREATER; break;
default: ASSERT( 0 );
default: dw = D3DCMP_NEVER; ASSERT( 0 );
}
g_pd3dDevice->SetRenderState( D3DRS_ZFUNC, dw );
}
+5 -5
View File
@@ -1358,7 +1358,7 @@ void RageCompiledGeometryHWOGL::Draw( int iMeshIndex ) const
#define BUFFER_OFFSET(o) ((char*)(o))
ASSERT( glDrawRangeElements);
ASSERT( glDrawRangeElements != NULL );
glDrawRangeElements(
GL_TRIANGLES,
meshInfo.iVertexStart, // minimum array index contained in indices
@@ -2109,7 +2109,7 @@ unsigned RageDisplay_Legacy::CreateTexture(
// allocate OpenGL texture resource
unsigned int iTexHandle;
glGenTextures( 1, reinterpret_cast<GLuint*>(&iTexHandle) );
ASSERT( iTexHandle );
ASSERT( iTexHandle != 0 );
glBindTexture( GL_TEXTURE_2D, iTexHandle );
@@ -2360,7 +2360,7 @@ void RenderTarget_FramebufferObject::Create( const RenderTargetParam &param, int
// Allocate OpenGL texture resource
glGenTextures( 1, reinterpret_cast<GLuint*>(&m_iTexHandle) );
ASSERT( m_iTexHandle );
ASSERT( m_iTexHandle != 0 );
int iTextureWidth = power_of_two( param.iWidth );
int iTextureHeight = power_of_two( param.iHeight );
@@ -2387,7 +2387,7 @@ void RenderTarget_FramebufferObject::Create( const RenderTargetParam &param, int
/* Create the framebuffer object. */
glGenFramebuffersEXT( 1, reinterpret_cast<GLuint*>(&m_iFrameBufferHandle) );
ASSERT( m_iFrameBufferHandle );
ASSERT( m_iFrameBufferHandle != 0 );
/* Attach the texture to it. */
glBindFramebufferEXT( GL_FRAMEBUFFER_EXT, m_iFrameBufferHandle );
@@ -2398,7 +2398,7 @@ void RenderTarget_FramebufferObject::Create( const RenderTargetParam &param, int
if (param.bWithDepthBuffer)
{
glGenRenderbuffersEXT( 1, reinterpret_cast<GLuint*>(&m_iDepthBufferHandle) );
ASSERT( m_iDepthBufferHandle );
ASSERT( m_iDepthBufferHandle != 0 );
glRenderbufferStorageEXT( GL_RENDERBUFFER_EXT, GL_DEPTH_COMPONENT16, iTextureWidth, iTextureHeight );
glFramebufferRenderbufferEXT( GL_FRAMEBUFFER_EXT, GL_DEPTH_ATTACHMENT_EXT, GL_RENDERBUFFER_EXT, m_iDepthBufferHandle );
+1 -1
View File
@@ -44,7 +44,7 @@ RString RageFile::GetPath() const
bool RageFile::Open( const RString& path, int mode )
{
ASSERT( FILEMAN );
ASSERT( FILEMAN != NULL );
Close();
m_Path = path;
+4 -4
View File
@@ -19,12 +19,12 @@ public:
virtual int GetFileHash( const RString &sPath );
virtual int GetPathValue( const RString &sPath );
virtual void FlushDirCache( const RString &sPath );
virtual void CacheFile( const RString &sPath ) { }
virtual bool Move( const RString &sOldPath, const RString &sNewPath ) { return false; }
virtual bool Remove( const RString &sPath ) { return false; }
virtual void CacheFile( const RString & /* sPath */ ) { }
virtual bool Move( const RString & /* sOldPath */, const RString & /* sNewPath */ ) { return false; }
virtual bool Remove( const RString & /* sPath */ ) { return false; }
/* Optional: Move to a different place, as if reconstructed with a different path. */
virtual bool Remount( const RString &sPath ) { return false; }
virtual bool Remount( const RString & /* sPath */ ) { return false; }
/* Possible error returns from Open, in addition to standard errno.h values: */
enum { ERROR_WRITING_NOT_SUPPORTED = -1 };
+3 -3
View File
@@ -208,8 +208,8 @@ RageFileBasic *RageFileDriverDirectReadOnly::Open( const RString &sPath, int iMo
return RageFileDriverDirect::Open( sPath, iMode, iError );
}
bool RageFileDriverDirectReadOnly::Move( const RString &sOldPath, const RString &sNewPath ) { return false; }
bool RageFileDriverDirectReadOnly::Remove( const RString &sPath ) { return false; }
bool RageFileDriverDirectReadOnly::Move( const RString & /* sOldPath */, const RString & /* sNewPath */ ) { return false; }
bool RageFileDriverDirectReadOnly::Remove( const RString & /* sPath */ ) { return false; }
static const unsigned int BUFSIZE = 1024*64;
RageFileObjDirect::RageFileObjDirect( const RString &sPath, int iFD, int iMode )
@@ -248,7 +248,7 @@ namespace
return true;
}
#else
bool FlushDir( RString sPath, RString &sError )
bool FlushDir( RString /* sPath */, RString & /* sError */ )
{
return true;
}
+1 -1
View File
@@ -37,7 +37,7 @@ public:
~RageFileDriverMem();
RageFileBasic *Open( const RString &sPath, int mode, int &err );
void FlushDirCache( const RString &sPath ) { }
void FlushDirCache( const RString & /* sPath */ ) { }
bool Remove( const RString &sPath );
+1 -1
View File
@@ -64,7 +64,7 @@ void RageSurfaceFormat::GetRGB( uint32_t val, uint8_t *r, uint8_t *g, uint8_t *b
{
if( BytesPerPixel == 1 )
{
ASSERT( palette );
ASSERT( palette != NULL );
*r = palette->colors[val].r;
*g = palette->colors[val].g;
*b = palette->colors[val].b;
+2 -2
View File
@@ -134,7 +134,7 @@ void RageSurfaceUtils::CopySurface( const RageSurface *src, RageSurface *dest )
// Copy the palette, if we have one.
if( src->format->BitsPerPixel == 8 && dest->format->BitsPerPixel == 8 )
{
ASSERT( dest->fmt.palette );
ASSERT( dest->fmt.palette != NULL );
*dest->fmt.palette = *src->fmt.palette;
}
@@ -791,7 +791,7 @@ RageSurface *RageSurfaceUtils::LoadSurface( RString file )
// Create the surface.
RageSurface *img = CreateSurface( h.width, h.height, h.bpp,
h.Rmask, h.Gmask, h.Bmask, h.Amask );
ASSERT( img );
ASSERT( img != NULL );
/* If the pitch has changed, this surface is either corrupt, or was
* created with a different version whose CreateSurface() behavior
+2 -2
View File
@@ -330,9 +330,9 @@ static acolorhist_item *mediancut( acolorhist_item *achv, int colors, int sum, i
int boxes;
bv = (box_vector) malloc( sizeof(struct box) * newcolors );
ASSERT( bv );
ASSERT( bv != NULL );
acolormap = (acolorhist_item*) malloc( sizeof(struct acolorhist_item) * newcolors);
ASSERT( acolormap );
ASSERT( acolormap != NULL );
for ( int i = 0; i < newcolors; ++i )
PAM_ASSIGN( acolormap[i].acolor, 0, 0, 0, 0 );
+1 -1
View File
@@ -31,7 +31,7 @@ static RageSurface *TryOpenFile( RString sPath, bool bHeaderOnly, RString &error
if( result == RageSurfaceUtils::OPEN_OK )
{
ASSERT( ret );
ASSERT( ret != NULL );
return ret;
}
+1 -1
View File
@@ -229,7 +229,7 @@ static RageSurface *RageSurface_Load_PNG( RageFile *f, const char *fn, char erro
default:
FAIL_M(ssprintf( "%i", type) );
}
ASSERT( img );
ASSERT( img != NULL );
/* alloca to prevent memleaks if libpng longjmps us */
png_byte **row_pointers = (png_byte **) alloca( sizeof(png_byte*) * height );
+1 -1
View File
@@ -27,7 +27,7 @@ RageTexturePreloader &RageTexturePreloader::operator=( const RageTexturePreloade
void RageTexturePreloader::Load( const RageTextureID &ID )
{
ASSERT( TEXTUREMAN );
ASSERT( TEXTUREMAN != NULL );
RageTexture *pTexture = TEXTUREMAN->LoadTexture( ID );
m_apTextures.push_back( pTexture );
+4 -4
View File
@@ -175,7 +175,7 @@ bool FilenameDB::ResolvePath( RString &sPath )
const FileSet *fs = NULL;
static const RString slash("/");
while( 1 )
for(;;)
{
split( sPath, slash, iBegin, iSize, true );
if( iBegin == (int) sPath.size() )
@@ -284,7 +284,7 @@ FileSet *FilenameDB::GetFileSet( const RString &sDir_, bool bCreate )
m_Mutex.Lock();
while(1)
for(;;)
{
/* Look for the directory. */
map<RString, FileSet *>::iterator i = dirs.find( sLower );
@@ -476,12 +476,12 @@ void FilenameDB::DelFile( const RString &sPath )
m_Mutex.Unlock(); /* locked by GetFileSet */
}
void FilenameDB::FlushDirCache( const RString &sDir )
void FilenameDB::FlushDirCache( const RString & /* sDir */ )
{
FileSet *pFileSet = NULL;
m_Mutex.Lock();
while( true )
for(;;)
{
if( dirs.empty() )
break;
+2 -2
View File
@@ -126,7 +126,7 @@ protected:
void DelFileSet( map<RString, FileSet *>::iterator dir );
/* The given path wasn't cached. Cache it. */
virtual void PopulateFileSet( FileSet &fs, const RString &sPath ) { }
virtual void PopulateFileSet( FileSet & /* fs */, const RString & /* sPath */ ) { }
};
/* This FilenameDB must be populated in advance. */
@@ -134,7 +134,7 @@ class NullFilenameDB: public FilenameDB
{
public:
NullFilenameDB() { ExpireSeconds = -1; }
void CacheFile( const RString &sPath ) { }
void CacheFile( const RString & /* sPath */ ) { }
};
#endif
+1 -1
View File
@@ -163,7 +163,7 @@ void ScoreKeeperRave::AddSuperMeterDelta( float fUnscaledPercentChange )
{
case PLAYER_1: bWinning = GAMESTATE->m_fTugLifePercentP1 > 0.5f; break;
case PLAYER_2: bWinning = GAMESTATE->m_fTugLifePercentP1 < 0.5f; break;
default: ASSERT(0);
default: bWinning = false; ASSERT(0);
}
if( !bWinning )
m_pPlayerState->EndActiveAttacks();
+2 -2
View File
@@ -335,7 +335,7 @@ void ScreenOptionsEditCourse::ExportOptions( int iRow, const vector<PlayerNumber
if( pSong )
{
Steps *pSteps = this->GetStepsForEntry( iEntryIndex );
ASSERT_M( pSteps, "No Steps for this Song!" );
ASSERT_M( pSteps != NULL, "No Steps for this Song!" );
CourseEntry ce;
ce.songID.FromSong( pSong );
ce.stepsCriteria.m_difficulty = pSteps->GetDifficulty();
@@ -412,7 +412,7 @@ void ScreenOptionsEditCourse::SetCurrentSteps()
OptionRow &row = *m_pRows[ EntryIndexAndRowTypeToRow(iEntryIndex, RowType_Steps) ];
int iStepsIndex = row.GetOneSharedSelection();
const EditCourseOptionRowHandlerSteps *pHand = dynamic_cast<const EditCourseOptionRowHandlerSteps *>( row.GetHandler() );
ASSERT( pHand );
ASSERT( pHand != NULL );
Steps *pSteps = pHand->GetSteps( iStepsIndex );
GAMESTATE->m_pCurSteps[PLAYER_1].Set( pSteps );
}
+3 -3
View File
@@ -30,7 +30,7 @@ void ScreenOptionsEditProfile::BeginScreen()
vector<OptionRowHandler*> vHands;
Profile *pProfile = PROFILEMAN->GetLocalProfile( GAMESTATE->m_sEditLocalProfileID );
ASSERT( pProfile );
ASSERT( pProfile != NULL );
{
vHands.push_back( OptionRowHandlerUtil::MakeNull() );
@@ -64,7 +64,7 @@ ScreenOptionsEditProfile::~ScreenOptionsEditProfile()
void ScreenOptionsEditProfile::ImportOptions( int iRow, const vector<PlayerNumber> &vpns )
{
Profile *pProfile = PROFILEMAN->GetLocalProfile( GAMESTATE->m_sEditLocalProfileID );
ASSERT( pProfile );
ASSERT( pProfile != NULL );
OptionRow &row = *m_pRows[iRow];
switch( iRow )
@@ -78,7 +78,7 @@ void ScreenOptionsEditProfile::ImportOptions( int iRow, const vector<PlayerNumbe
void ScreenOptionsEditProfile::ExportOptions( int iRow, const vector<PlayerNumber> &vpns )
{
Profile *pProfile = PROFILEMAN->GetLocalProfile( GAMESTATE->m_sEditLocalProfileID );
ASSERT( pProfile );
ASSERT( pProfile != NULL );
OptionRow &row = *m_pRows[iRow];
int iIndex = row.GetOneSharedSelection( true );
RString sValue;
+2 -2
View File
@@ -872,7 +872,7 @@ void ThemeManager::ReloadMetrics()
RString ThemeManager::GetMetricsGroupFallback( const RString &sMetricsGroup )
{
ASSERT( g_pLoadedThemeData );
ASSERT( g_pLoadedThemeData != NULL );
// always look in iniMetrics for "Fallback"
RString sFallback;
@@ -1166,7 +1166,7 @@ RString ThemeManager::GetString( const RString &sMetricsGroup, const RString &sV
sValueName.Replace( "\r\n", "\\n" );
sValueName.Replace( "\n", "\\n" );
ASSERT( g_pLoadedThemeData );
ASSERT( g_pLoadedThemeData != NULL );
RString s = GetMetricRaw( g_pLoadedThemeData->iniStrings, sMetricsGroup, sValueName );
FontCharAliases::ReplaceMarkers( s );
+1 -1
View File
@@ -204,7 +204,7 @@ float ArchHooks_Win32::GetDisplayAspectRatio()
ZERO( dm );
dm.dmSize = sizeof(dm);
BOOL bResult = EnumDisplaySettings( NULL, ENUM_REGISTRY_SETTINGS, &dm );
ASSERT( bResult );
ASSERT( bResult != 0 );
return dm.dmPelsWidth / (float)dm.dmPelsHeight;
}
@@ -25,10 +25,10 @@ static HBITMAP LoadWin32Surface( RageSurface *&s )
RageSurfaceUtils::ConvertSurface( s, s->w, s->h, 32, 0xFF000000, 0x00FF0000, 0x0000FF00, 0 );
HDC hScreen = GetDC(NULL);
ASSERT_M( hScreen, werr_ssprintf(GetLastError(), "hScreen") );
ASSERT_M( hScreen != NULL, werr_ssprintf(GetLastError(), "hScreen") );
HBITMAP bitmap = CreateCompatibleBitmap( hScreen, s->w, s->h );
ASSERT_M( bitmap, werr_ssprintf(GetLastError(), "CreateCompatibleBitmap") );
ASSERT_M( bitmap != NULL, werr_ssprintf(GetLastError(), "CreateCompatibleBitmap") );
HDC BitmapDC = CreateCompatibleDC( hScreen );
SelectObject( BitmapDC, bitmap );
@@ -140,7 +140,7 @@ RString LowLevelWindow_Win32::TryVideoMode( const VideoModeParams &p, bool &bNew
bCanSetPixelFormat = false;
}
ASSERT( GraphicsWindow::GetHwnd() );
ASSERT( GraphicsWindow::GetHwnd() != NULL );
/* Set the display mode: switch to a fullscreen mode or revert to windowed mode. */
LOG->Trace("SetScreenMode ...");
+1 -1
View File
@@ -106,7 +106,7 @@ RageMovieTexture *RageMovieTexture::Create( RageTextureID ID )
}
RageMovieTextureDriver *pDriver = dynamic_cast<RageMovieTextureDriver *>( pDriverBase );
ASSERT( pDriver );
ASSERT( pDriver != NULL );
RString sError;
ret = pDriver->Create( ID, sError );
@@ -219,7 +219,7 @@ RageSurface *RageMovieTextureDriver_FFMpeg::AVCodecCreateCompatibleSurface( int
for( iAVTexfmtIndex = 0; AVPixelFormats[iAVTexfmtIndex].bpp; ++iAVTexfmtIndex )
if( AVPixelFormats[iAVTexfmtIndex].bHighColor == bPreferHighColor )
break;
ASSERT( AVPixelFormats[iAVTexfmtIndex].bpp );
ASSERT( AVPixelFormats[iAVTexfmtIndex].bpp != 0 );
}
const AVPixelFormat_t *pfd = &AVPixelFormats[iAVTexfmtIndex];
@@ -664,7 +664,7 @@ RString MovieDecoder_FFMpeg::OpenCodec()
{
Init();
ASSERT( m_pStream );
ASSERT( m_pStream != NULL );
if( m_pStream->codec->codec )
avcodec::avcodec_close( m_pStream->codec );
@@ -684,7 +684,7 @@ RString MovieDecoder_FFMpeg::OpenCodec()
int ret = avcodec::avcodec_open2( m_pStream->codec, pCodec, NULL );
if( ret < 0 )
return RString( averr_ssprintf(ret, "Couldn't open codec \"%s\"", pCodec->name) );
ASSERT( m_pStream->codec->codec );
ASSERT( m_pStream->codec->codec != NULL );
return RString();
}
+3 -3
View File
@@ -259,7 +259,7 @@ static bool WdmGetPinPropertyMulti(
return false;
*ksMultipleItem = (KSMULTIPLE_ITEM*) malloc( multipleItemSize );
ASSERT( *ksMultipleItem );
ASSERT( *ksMultipleItem != NULL );
if( !WdmSyncIoctl( hHandle, IOCTL_KS_PROPERTY, &ksPProp, sizeof(KSP_PIN), (void*)*ksMultipleItem, multipleItemSize, NULL, sError) )
{
@@ -1004,7 +1004,7 @@ bool WinWdmStream::Open( WinWdmFilter *pFilter,
/* Avoid any FileAlignment problems by using VirtualAlloc, which is always page aligned. */
p->Data = (char *) VirtualAlloc( NULL, m_iFramesPerChunk*m_iBytesPerOutputSample*m_iDeviceOutputChannels, MEM_COMMIT|MEM_RESERVE, PAGE_READWRITE );
ASSERT( p->Data );
ASSERT( p->Data != NULL );
p->FrameExtent = m_iFramesPerChunk*m_iBytesPerOutputSample*m_iDeviceOutputChannels;
p->DataUsed = m_iFramesPerChunk*m_iBytesPerOutputSample*m_iDeviceOutputChannels;
p->Size = sizeof(*p);
@@ -1178,7 +1178,7 @@ void RageSoundDriver_WDMKS::MixerThread()
/* Enable priority boosting. */
SetThreadPriorityBoost( GetCurrentThread(), FALSE );
ASSERT( m_pStream->m_pPlaybackPin );
ASSERT( m_pStream->m_pPlaybackPin != NULL );
/* Some drivers (stock USB audio in XP) misbehave if we go from KSSTATE_STOP to
* KSSTATE_RUN. Always transition through KSSTATE_PAUSE. */
+1 -1
View File
@@ -159,7 +159,7 @@ ThreadImpl *MakeThread( int (*pFunc)(void *pData), void *pData, uint64_t *piThre
thread->ThreadHandle = CreateThread( NULL, 0, &StartThread, thread, CREATE_SUSPENDED, &thread->ThreadId );
*piThreadID = (uint64_t) thread->ThreadId;
ASSERT_M( thread->ThreadHandle, ssprintf("%s", werr_ssprintf(GetLastError(), "CreateThread")) );
ASSERT_M( thread->ThreadHandle != NULL, ssprintf("%s", werr_ssprintf(GetLastError(), "CreateThread")) );
int slot = GetOpenSlot( thread->ThreadId );
g_ThreadHandles[slot] = thread->ThreadHandle;
+4 -4
View File
@@ -30,7 +30,7 @@ static HFONT CreatePointFontIndirect(const LOGFONT* lpLogFont)
// nPointSize is actually scaled 10x
static HFONT CreatePointFont(int nPointSize, LPCTSTR lpszFaceName)
{
ASSERT(lpszFaceName);
ASSERT(lpszFaceName != NULL);
LOGFONT logFont;
memset(&logFont, 0, sizeof(LOGFONT));
@@ -43,10 +43,10 @@ static HFONT CreatePointFont(int nPointSize, LPCTSTR lpszFaceName)
void DialogUtil::SetHeaderFont( HWND hdlg, int nID )
{
ASSERT( hdlg );
ASSERT( hdlg != NULL );
HWND hControl = ::GetDlgItem( hdlg, nID );
ASSERT( hControl );
ASSERT( hControl != NULL );
// TODO: Fix font leak
const int FONT_POINTS = 16;
@@ -56,7 +56,7 @@ void DialogUtil::SetHeaderFont( HWND hdlg, int nID )
void DialogUtil::LocalizeDialogAndContents( HWND hdlg )
{
ASSERT( THEME );
ASSERT( THEME != NULL );
const int LARGE_STRING = 256;
char szTemp[LARGE_STRING] = "";