]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
Don't pre-size result string in ada_decode
authorTom Tromey <tromey@adacore.com>
Thu, 3 Feb 2022 19:24:12 +0000 (12:24 -0700)
committerTom Tromey <tromey@adacore.com>
Mon, 7 Mar 2022 14:52:59 +0000 (07:52 -0700)
commit36f5ca535d0cffb4d9767f4471ac632dddd94c3b
tree39057d90ece16a147883629e2f6e113d0d4798c9
parenta320f135ddb4726474394841a19f3e2cba216ff3
Don't pre-size result string in ada_decode

Currently, ada_decode pre-sizes the output string, filling it with 'X'
characters.  However, it's a bit simpler and more flexible to let
std::string do the work here, and simply append characters to the
string as we go.  This turns out to be useful for a subsequent patch.
gdb/ada-lang.c