#23 redundant call of strlen()

Unstable (example)
closed-out-of-date
nobody
None
5
2015-03-06
2013-10-10
No

We are happily using your fine jsoncpp on our embedded system. We don't have a very powerfull CPU in there. Hence the software should be as efficient as possible.

yesterday something caught my eye:
json_writer::valueToString uses sprintf. Afterwards the lentgh of the resulting string is being calculated. Why not using the length returnd by sprintf?

Attached you can find a diff file.

best regards,
Matthias Loy

1 Attachments

Discussion

  • Christopher Dunn

    Good idea, but valueToString() has changed. Not needed anymore.

     
  • Christopher Dunn

    • status: open --> closed-out-of-date
     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks