Use const reference for decimal_from_string argument

No functional change.

gdb/ChangeLog:
2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>

	* dfp.h (decimal_from_string): Use const reference for argument.
	* dfp.c (decimal_from_string): Likewise.
This commit is contained in:
Ulrich Weigand 2017-10-24 18:34:41 +02:00
parent 8ba0dd515c
commit 09a7c6aa7a
3 changed files with 7 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
* dfp.h (decimal_from_string): Use const reference for argument.
* dfp.c (decimal_from_string): Likewise.
2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
* i387-tdep.c (print_i387_value): Use floatformat_to_string.

View File

@ -190,7 +190,7 @@ decimal_to_string (const gdb_byte *decbytes, int len,
decimal64 and 16 bytes for decimal128. */
bool
decimal_from_string (gdb_byte *decbytes, int len, enum bfd_endian byte_order,
std::string string)
const std::string &string)
{
decContext set;
gdb_byte dec[16];

View File

@ -31,7 +31,7 @@
extern std::string decimal_to_string (const gdb_byte *, int, enum bfd_endian,
const char *format = nullptr);
extern bool decimal_from_string (gdb_byte *, int, enum bfd_endian,
std::string string);
const std::string &string);
extern void decimal_from_longest (LONGEST from, gdb_byte *to,
int len, enum bfd_endian byte_order);
extern void decimal_from_ulongest (ULONGEST from, gdb_byte *to,