Replaced ineffective char const * with string const &

This commit is contained in:
Alex Zolotarev 2011-11-09 16:01:58 +03:00 committed by Alex Zolotarev
parent b83905901e
commit 3cd091ed79
6 changed files with 6 additions and 6 deletions

View file

@ -25,7 +25,7 @@ class FileReaderStream : public stream::ReaderStream<ReaderSource<FileReader> >
ReaderSource<FileReader> m_reader;
public:
FileReaderStream(char const * fName)
FileReaderStream(string const & fName)
: base_type(m_reader), m_file(fName), m_reader(m_file)
{
}

View file

@ -10,7 +10,7 @@ class FileWriterStream : public stream::WriterStream<FileWriter>
FileWriter m_file;
public:
FileWriterStream(char const * fName)
FileWriterStream(string const & fName)
: base_type(m_file), m_file(fName) {}
using base_type::operator <<;

View file

@ -92,7 +92,7 @@ namespace classificator
for (int i = 0; i <= 17; ++i)
ftype::ParseOSMTypes(inFile.c_str(), i);
drule::WriteRules(string(path + "drawing_rules.bin").c_str());
drule::WriteRules(string(path + "drawing_rules.bin"));
classif().PrintClassificator(string(path + "classificator.txt").c_str());
}

View file

@ -136,7 +136,7 @@ namespace cache
public:
DataFileBase(string const & name)
: m_stream(name.c_str()), m_offsets(name + OFFSET_EXT)
: m_stream(name), m_offsets(name + OFFSET_EXT)
{
}
};

View file

@ -1056,7 +1056,7 @@ void RulesHolder::Write(FileWriterStream & s)
s << m_container << m_rules;
}
void WriteRules(char const * fPath)
void WriteRules(string const & fPath)
{
FileWriterStream file(fPath);
rules().Write(file);

View file

@ -166,7 +166,7 @@ namespace drule
}
};
void WriteRules(char const * fPath);
void WriteRules(string const & fPath);
void ReadRules(ReaderPtrStream & s);
RulesHolder & rules();