mirror of
https://github.com/libretro/Play-.git
synced 2025-02-24 13:40:43 +00:00
Remove Utils.
GetLine was moved in Framework.
This commit is contained in:
parent
84c3301ad7
commit
85ab226176
@ -393,8 +393,6 @@ set(COMMON_SRC_FILES
|
||||
StructCollectionStateFile.h
|
||||
StructFile.cpp
|
||||
StructFile.h
|
||||
Utils.cpp
|
||||
Utils.h
|
||||
VirtualPad.cpp
|
||||
VirtualPad.h
|
||||
)
|
||||
|
@ -88,7 +88,7 @@ DiskUtils::OpticalMediaPtr DiskUtils::CreateOpticalMediaFromPath(const boost::fi
|
||||
DiskUtils::SystemConfigMap DiskUtils::ParseSystemConfigFile(Framework::CStream* systemCnfFile)
|
||||
{
|
||||
SystemConfigMap result;
|
||||
auto line = Utils::GetLine(systemCnfFile);
|
||||
auto line = systemCnfFile->ReadLine();
|
||||
while(!systemCnfFile->IsEOF())
|
||||
{
|
||||
auto trimmedEnd = std::remove_if(line.begin(), line.end(), isspace);
|
||||
@ -99,7 +99,7 @@ DiskUtils::SystemConfigMap DiskUtils::ParseSystemConfigFile(Framework::CStream*
|
||||
{
|
||||
result.insert(std::make_pair(components[0], components[1]));
|
||||
}
|
||||
line = Utils::GetLine(systemCnfFile);
|
||||
line = systemCnfFile->ReadLine();
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
@ -1,19 +0,0 @@
|
||||
#include <string.h>
|
||||
#include "Utils.h"
|
||||
|
||||
std::string Utils::GetLine(Framework::CStream* stream, bool nIgnoreCR)
|
||||
{
|
||||
std::string result;
|
||||
unsigned char nChar = 0;
|
||||
stream->Read(&nChar, 1);
|
||||
while(!stream->IsEOF())
|
||||
{
|
||||
if(nChar == '\n') break;
|
||||
if(!(nIgnoreCR && (nChar == '\r')))
|
||||
{
|
||||
result += nChar;
|
||||
}
|
||||
stream->Read(&nChar, 1);
|
||||
}
|
||||
return result;
|
||||
}
|
@ -1,9 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include "Stream.h"
|
||||
|
||||
namespace Utils
|
||||
{
|
||||
std::string GetLine(Framework::CStream*, bool = true);
|
||||
}
|
@ -64,10 +64,10 @@ CGSHandler::FactoryFunction GetGsHandlerFactoryFunction(const std::string& gsHan
|
||||
std::vector<std::string> ReadLines(Framework::CStream& inputStream)
|
||||
{
|
||||
std::vector<std::string> lines;
|
||||
lines.push_back(Utils::GetLine(&inputStream));
|
||||
lines.push_back(inputStream.ReadLine());
|
||||
while(!inputStream.IsEOF())
|
||||
{
|
||||
lines.push_back(Utils::GetLine(&inputStream));
|
||||
lines.push_back(inputStream.ReadLine());
|
||||
}
|
||||
return lines;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user