Remove global "using namespace std;" declarations, use "std::" prefixes on all std elements

Fix whitespace changes
This commit is contained in:
Michael Sundqvist
2022-07-10 18:28:56 +03:00
committed by Martin Natano
parent f0680a29fc
commit 0cba3579de
534 changed files with 3456 additions and 3488 deletions
+18 -18
View File
@@ -22,7 +22,7 @@ static void GetResolutionFromFileName( RString sPath, int &iWidth, int &iHeight
* Be careful that this doesn't get mixed up with frame dimensions. */
static Regex re( "\\([^\\)]*res ([0-9]+)x([0-9]+).*\\)" );
vector<RString> asMatches;
std::vector<RString> asMatches;
if( !re.Compare(sPath, asMatches) )
return;
@@ -110,21 +110,21 @@ void RageBitmapTexture::Create()
RString sHintString = GetID().filename + actualID.AdditionalTextureHints;
sHintString.MakeLower();
if( sHintString.find("32bpp") != string::npos ) actualID.iColorDepth = 32;
else if( sHintString.find("16bpp") != string::npos ) actualID.iColorDepth = 16;
if( sHintString.find("dither") != string::npos ) actualID.bDither = true;
if( sHintString.find("stretch") != string::npos ) actualID.bStretch = true;
if( sHintString.find("mipmaps") != string::npos ) actualID.bMipMaps = true;
if( sHintString.find("nomipmaps") != string::npos ) actualID.bMipMaps = false; // check for "nomipmaps" after "mipmaps"
if( sHintString.find("32bpp") != std::string::npos ) actualID.iColorDepth = 32;
else if( sHintString.find("16bpp") != std::string::npos ) actualID.iColorDepth = 16;
if( sHintString.find("dither") != std::string::npos ) actualID.bDither = true;
if( sHintString.find("stretch") != std::string::npos ) actualID.bStretch = true;
if( sHintString.find("mipmaps") != std::string::npos ) actualID.bMipMaps = true;
if( sHintString.find("nomipmaps") != std::string::npos ) actualID.bMipMaps = false; // check for "nomipmaps" after "mipmaps"
/* If the image is marked grayscale, then use all bits not used for alpha
* for the intensity. This way, if an image has no alpha, you get an 8-bit
* grayscale; if it only has boolean transparency, you get a 7-bit grayscale. */
if( sHintString.find("grayscale") != string::npos ) actualID.iGrayscaleBits = 8-actualID.iAlphaBits;
if( sHintString.find("grayscale") != std::string::npos ) actualID.iGrayscaleBits = 8-actualID.iAlphaBits;
/* This indicates that the only component in the texture is alpha; assume all
* color is white. */
if( sHintString.find("alphamap") != string::npos ) actualID.iGrayscaleBits = 0;
if( sHintString.find("alphamap") != std::string::npos ) actualID.iGrayscaleBits = 0;
/* No iGrayscaleBits for images that are already paletted. We don't support
* that; and that hint is intended for use on images that are already grayscale,
@@ -133,7 +133,7 @@ void RageBitmapTexture::Create()
actualID.iGrayscaleBits = -1;
/* Cap the max texture size to the hardware max. */
actualID.iMaxSize = min( actualID.iMaxSize, DISPLAY->GetMaxTextureSize() );
actualID.iMaxSize = std::min( actualID.iMaxSize, DISPLAY->GetMaxTextureSize() );
/* Save information about the source. */
m_iSourceWidth = pImg->w;
@@ -144,7 +144,7 @@ void RageBitmapTexture::Create()
m_iImageHeight = m_iSourceHeight;
/* if "doubleres" (high resolution) and we're not allowing high res textures, then image dimensions are half of the source */
if( sHintString.find("doubleres") != string::npos )
if( sHintString.find("doubleres") != std::string::npos )
{
if( !StepMania::GetHighResolutionTextures() )
{
@@ -154,8 +154,8 @@ void RageBitmapTexture::Create()
}
/* image size cannot exceed max size */
m_iImageWidth = min( m_iImageWidth, actualID.iMaxSize );
m_iImageHeight = min( m_iImageHeight, actualID.iMaxSize );
m_iImageWidth = std::min( m_iImageWidth, actualID.iMaxSize );
m_iImageHeight = std::min( m_iImageHeight, actualID.iMaxSize );
/* Texture dimensions need to be a power of two; jump to the next. */
m_iTextureWidth = power_of_two(m_iImageWidth);
@@ -165,8 +165,8 @@ void RageBitmapTexture::Create()
if( m_iTextureWidth < 8 || m_iTextureHeight < 8 )
{
actualID.bStretch = true;
m_iTextureWidth = max( 8, m_iTextureWidth );
m_iTextureHeight = max( 8, m_iTextureHeight );
m_iTextureWidth = std::max( 8, m_iTextureWidth );
m_iTextureHeight = std::max( 8, m_iTextureHeight );
}
ASSERT_M( m_iTextureWidth <= actualID.iMaxSize, ssprintf("w %i, %i", m_iTextureWidth, actualID.iMaxSize) );
@@ -210,7 +210,7 @@ void RageBitmapTexture::Create()
int iSourceAlphaBits = 8 - pImg->format->Loss[3];
// Don't use more than we were hinted to.
iSourceAlphaBits = min( actualID.iAlphaBits, iSourceAlphaBits );
iSourceAlphaBits = std::min( actualID.iAlphaBits, iSourceAlphaBits );
switch( iSourceAlphaBits )
{
@@ -276,7 +276,7 @@ void RageBitmapTexture::Create()
// Otherwise, pixel/texel alignment will be off.
int iDimensionMultiple = 2;
if( sHintString.find("doubleres") != string::npos )
if( sHintString.find("doubleres") != std::string::npos )
{
iDimensionMultiple = 4;
}
@@ -334,7 +334,7 @@ void RageBitmapTexture::Create()
* with dimensions 1/2 of the source. So, cut down the source dimension here
* after everything above is finished operating with the real image
* source dimensions. */
if( sHintString.find("doubleres") != string::npos )
if( sHintString.find("doubleres") != std::string::npos )
{
m_iSourceWidth = m_iSourceWidth / 2;
m_iSourceHeight = m_iSourceHeight / 2;