fixed: renamed a local variable in Generator (it did not compile)
git-svn-id: svn://ttmath.org/publicrep/ezc/trunk@446 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
parent
9215130b9d
commit
5de31cfe41
|
@ -117,18 +117,18 @@ private:
|
||||||
// if we are printing only to one stream e.g. [put stream "3"]
|
// if we are printing only to one stream e.g. [put stream "3"]
|
||||||
// then output_stream is pointing directly to that stream
|
// then output_stream is pointing directly to that stream
|
||||||
// but if we are printing to more than one stream e.g. [put stream "0" "2" "5"]
|
// but if we are printing to more than one stream e.g. [put stream "0" "2" "5"]
|
||||||
// then output_stream is pointing to tmp_stream and at the end
|
// then output_stream is pointing to output_tmp_stream and at the end
|
||||||
// tmp_stream is copied to the correct streams
|
// output_tmp_stream is copied to the correct streams
|
||||||
// output_stream can be null e.g. [put stream] without arguments
|
// output_stream can be null e.g. [put stream] without arguments
|
||||||
// in such a case we do not print anything
|
// in such a case we do not print anything
|
||||||
StreamType * output_stream;
|
StreamType * output_stream;
|
||||||
Pattern * pattern;
|
Pattern * pattern;
|
||||||
Functions<StreamType> * functions;
|
Functions<StreamType> * functions;
|
||||||
|
|
||||||
// tmp_stream is used when outputting to more than one stream
|
// output_tmp_stream is used when outputting to more than one stream
|
||||||
// (first we output to tmp_stream and then the content is copied
|
// (first we output to output_tmp_stream and then the content is copied
|
||||||
// to the correct streams)
|
// to the correct streams)
|
||||||
StreamType tmp_stream;
|
StreamType output_tmp_stream;
|
||||||
|
|
||||||
// pointers to the output streams
|
// pointers to the output streams
|
||||||
std::vector<StreamType*> output_stream_tab;
|
std::vector<StreamType*> output_stream_tab;
|
||||||
|
@ -538,7 +538,7 @@ void Generator<StreamType>::Generate(Pattern * p, Functions<StreamType> * f)
|
||||||
|
|
||||||
output_stream = 0;
|
output_stream = 0;
|
||||||
output_stream_index.clear();
|
output_stream_index.clear();
|
||||||
ClearStream(tmp_stream);
|
ClearStream(output_tmp_stream);
|
||||||
|
|
||||||
if( !output_stream_tab.empty() )
|
if( !output_stream_tab.empty() )
|
||||||
{
|
{
|
||||||
|
@ -936,9 +936,9 @@ template<class StreamType>
|
||||||
void Generator<StreamType>::WriteTmpStreamToStreams()
|
void Generator<StreamType>::WriteTmpStreamToStreams()
|
||||||
{
|
{
|
||||||
#ifdef EZC_HAS_SPECIAL_STREAM
|
#ifdef EZC_HAS_SPECIAL_STREAM
|
||||||
const std::wstring & str = tmp_stream.Str();
|
const std::wstring & str = output_tmp_stream.Str();
|
||||||
#else
|
#else
|
||||||
const std::wstring & str = tmp_stream.str();
|
const std::wstring & str = output_tmp_stream.str();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if( !str.empty() )
|
if( !str.empty() )
|
||||||
|
@ -951,7 +951,7 @@ void Generator<StreamType>::WriteTmpStreamToStreams()
|
||||||
output_stream_tab[i]->write(str.c_str(), str.size());
|
output_stream_tab[i]->write(str.c_str(), str.size());
|
||||||
}
|
}
|
||||||
|
|
||||||
ClearStream(tmp_stream);
|
ClearStream(output_tmp_stream);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1459,8 +1459,8 @@ void Generator<StreamType>::MakeEzcStream(Item::Function & fun)
|
||||||
|
|
||||||
if( output_stream_index.size() > 1 )
|
if( output_stream_index.size() > 1 )
|
||||||
{
|
{
|
||||||
ClearStream(tmp_stream);
|
ClearStream(output_tmp_stream);
|
||||||
output_stream = &tmp_stream;
|
output_stream = &output_tmp_stream;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
if( output_stream_index.size() == 1 )
|
if( output_stream_index.size() == 1 )
|
||||||
|
|
Loading…
Reference in New Issue