mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
Kill off some usages of c_str.
Also changes some function params, but this is ok. Some simplifications were also able to be made (ie. killing off strcmps with ==, etc).
This commit is contained in:
@ -2,6 +2,8 @@
|
||||
// Licensed under GPLv2
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "AudioCommon/WaveFile.h"
|
||||
#include "Common/Common.h"
|
||||
#include "Core/ConfigManager.h"
|
||||
@ -21,7 +23,7 @@ WaveFileWriter::~WaveFileWriter()
|
||||
Stop();
|
||||
}
|
||||
|
||||
bool WaveFileWriter::Start(const char *filename, unsigned int HLESampleRate)
|
||||
bool WaveFileWriter::Start(const std::string& filename, unsigned int HLESampleRate)
|
||||
{
|
||||
if (!conv_buffer)
|
||||
conv_buffer = new short[BUF_SIZE];
|
||||
@ -29,14 +31,14 @@ bool WaveFileWriter::Start(const char *filename, unsigned int HLESampleRate)
|
||||
// Check if the file is already open
|
||||
if (file)
|
||||
{
|
||||
PanicAlertT("The file %s was already open, the file header will not be written.", filename);
|
||||
PanicAlertT("The file %s was already open, the file header will not be written.", filename.c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
file.Open(filename, "wb");
|
||||
if (!file)
|
||||
{
|
||||
PanicAlertT("The file %s could not be opened for writing. Please check if it's already opened by another program.", filename);
|
||||
PanicAlertT("The file %s could not be opened for writing. Please check if it's already opened by another program.", filename.c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user