Dne 8.8.2011 9:31, Michal Hocko napsal(a):
> On Sun, Aug 07, 2011 at 10:50:45PM +0000, Jozef Misutka wrote:
>> Update of /cvsroot/pdfedit/pdfedit/src/tools
>> In directory vz-cvs-3.sog:/tmp/cvs-serv14083/tools
>>
>> Modified Files:
>> pdf_to_text.cc
>> Log Message:
>> - few improvements
>> - nasty not initialized bug
>>
>>
>> Index: pdf_to_text.cc
>> ===================================================================
>> RCS file: /cvsroot/pdfedit/pdfedit/src/tools/pdf_to_text.cc,v
>> retrieving revision 1.5
>> retrieving revision 1.6
>> diff -u -d -r1.5 -r1.6
>> --- pdf_to_text.cc 7 Aug 2011 21:05:22 -0000 1.5
>> +++ pdf_to_text.cc 7 Aug 2011 22:50:43 -0000 1.6
>> @@ -36,9 +36,9 @@
>> namespace {
>>
>> // default values
>> - const string DEFAULT_ENCODING = "UTF-8";
>> + const string DEFAULT_ENCODING( "UTF-8" );
>> const bool DEFAULT_OUTPUT_PAGES = false;
>> - const string DEFAULT_FONT_DIR = ".";
>> + const string DEFAULT_FONT_DIR( "." );
> Hmm. I am just wondering. How is this an improvement? Compiler should
> use copy constructor for both cases, doesn't it? Or have you seen a
> compiler that would call a default constructor and then operator =?
the fact that i (you) have not does not mean there is no existing.
>
> Not that I would be against the change I just think that we should be
> more consistent about this kind of initialization and I can see many
> other places where we initialize string with =.
right and, imho, it is really unimportant which one we use. at least
not in this stage of development...
jm
View entire thread