forked from 0ad/0ad
Remove debug parser from replay menu. Refs #3440
This was SVN commit r17367.
This commit is contained in:
parent
477e8c36ee
commit
2e69872b11
@ -36,11 +36,6 @@
|
|||||||
*/
|
*/
|
||||||
const u8 minimumReplayDuration = 3;
|
const u8 minimumReplayDuration = 3;
|
||||||
|
|
||||||
/**
|
|
||||||
* Allows quick debugging of potential platform-dependent file-reading bugs.
|
|
||||||
*/
|
|
||||||
const bool debugParser = false;
|
|
||||||
|
|
||||||
OsPath VisualReplay::GetDirectoryName()
|
OsPath VisualReplay::GetDirectoryName()
|
||||||
{
|
{
|
||||||
return OsPath(psLogDir() / L"sim_log");
|
return OsPath(psLogDir() / L"sim_log");
|
||||||
@ -141,10 +136,6 @@ inline int getReplayDuration(std::istream *replayStream, const CStr& fileName, c
|
|||||||
if (currentPosition < 1)
|
if (currentPosition < 1)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
if (debugParser)
|
|
||||||
// TODO: throws a compiler warning on some systems
|
|
||||||
debug_printf("At position %i of %lu after %i lines reads.\n", currentPosition, fileSize, linesRead);
|
|
||||||
|
|
||||||
if (!replayStream->good())
|
if (!replayStream->good())
|
||||||
{
|
{
|
||||||
LOGERROR("Read error when determining replay duration at %i of %llu in %s", currentPosition - 2, fileSize, fileName.c_str());
|
LOGERROR("Read error when determining replay duration at %i of %llu in %s", currentPosition - 2, fileSize, fileName.c_str());
|
||||||
@ -172,9 +163,6 @@ JS::Value VisualReplay::LoadReplayData(ScriptInterface& scriptInterface, OsPath&
|
|||||||
// The directory argument must not be constant, otherwise concatenating will fail
|
// The directory argument must not be constant, otherwise concatenating will fail
|
||||||
const OsPath replayFile = GetDirectoryName() / directory / L"commands.txt";
|
const OsPath replayFile = GetDirectoryName() / directory / L"commands.txt";
|
||||||
|
|
||||||
if (debugParser)
|
|
||||||
debug_printf("Opening %s\n", replayFile.string8().c_str());
|
|
||||||
|
|
||||||
if (!FileExists(replayFile))
|
if (!FileExists(replayFile))
|
||||||
return JSVAL_NULL;
|
return JSVAL_NULL;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user