SaveScreenshot: Use const & in function header
Pass sPath by reference to avoid unnecessary copies.
This commit is contained in:
+1
-1
@@ -767,7 +767,7 @@ void RageDisplay::UpdateCentering()
|
|||||||
(float) p.m_iTranslateX, (float) p.m_iTranslateY, (float) p.m_iAddWidth, (float) p.m_iAddHeight );
|
(float) p.m_iTranslateX, (float) p.m_iTranslateY, (float) p.m_iAddWidth, (float) p.m_iAddHeight );
|
||||||
}
|
}
|
||||||
|
|
||||||
bool RageDisplay::SaveScreenshot( RString sPath, GraphicsFileFormat format )
|
bool RageDisplay::SaveScreenshot( const RString &sPath, GraphicsFileFormat format )
|
||||||
{
|
{
|
||||||
RageTimer timer;
|
RageTimer timer;
|
||||||
RageSurface *surface = this->CreateScreenshot();
|
RageSurface *surface = this->CreateScreenshot();
|
||||||
|
|||||||
+1
-1
@@ -360,7 +360,7 @@ public:
|
|||||||
SAVE_LOSSY_LOW_QUAL, // jpg
|
SAVE_LOSSY_LOW_QUAL, // jpg
|
||||||
SAVE_LOSSY_HIGH_QUAL // jpg
|
SAVE_LOSSY_HIGH_QUAL // jpg
|
||||||
};
|
};
|
||||||
bool SaveScreenshot( RString sPath, GraphicsFileFormat format );
|
bool SaveScreenshot( const RString &sPath, GraphicsFileFormat format );
|
||||||
|
|
||||||
virtual RString GetTextureDiagnostics( uintptr_t /* id */ ) const { return RString(); }
|
virtual RString GetTextureDiagnostics( uintptr_t /* id */ ) const { return RString(); }
|
||||||
virtual RageSurface* CreateScreenshot() = 0; // allocates a surface. Caller must delete it.
|
virtual RageSurface* CreateScreenshot() = 0; // allocates a surface. Caller must delete it.
|
||||||
|
|||||||
Reference in New Issue
Block a user