SaveScreenshot: Use const & in function header

Pass sPath by reference to avoid unnecessary copies.
This commit is contained in:
sukibaby
2025-05-01 13:10:12 -07:00
committed by teejusb
parent 16b3ba488d
commit b5a2f86277
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -767,7 +767,7 @@ void RageDisplay::UpdateCentering()
(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;
RageSurface *surface = this->CreateScreenshot();
+1 -1
View File
@@ -360,7 +360,7 @@ public:
SAVE_LOSSY_LOW_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 RageSurface* CreateScreenshot() = 0; // allocates a surface. Caller must delete it.