Use const reference for decimal_from_string argument
authorUlrich Weigand <ulrich.weigand@de.ibm.com>
Tue, 24 Oct 2017 16:34:41 +0000 (18:34 +0200)
committerUlrich Weigand <ulrich.weigand@de.ibm.com>
Tue, 24 Oct 2017 16:34:41 +0000 (18:34 +0200)
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.

gdb/ChangeLog
gdb/dfp.c
gdb/dfp.h

index b84ec6d07246ae532261dee240c64f7c13f54df7..7c792a33ce74bde5e0b610c7da584ce79f6dcdc3 100644 (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.
index 1cdb35cd91ee93c2c5431e08cd0dbc679034779e..a13e260611a7ad5423f205fd22a4622cce87df8b 100644 (file)
--- a/gdb/dfp.c
+++ b/gdb/dfp.c
@@ -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];
index 2f76043cda8d670d8099b0bdfedb6b8b9f6ee0ba..e17f1ce10c4206fe2aecca3421f23b9598f392dc 100644 (file)
--- a/gdb/dfp.h
+++ b/gdb/dfp.h
@@ -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,
This page took 0.035195 seconds and 4 git commands to generate.