Skip to content
Commit 01285426 authored by Tom Tromey's avatar Tom Tromey
Browse files

Use string_file::release in some places



I found a few spots like:

    string_file f;
    std::string x = f.string ();

However, string_file::string returns a 'const std::string &'...  so it
seems to me that this must be copying the string (? I find it hard to
reason about this in C++).

This patch changes these spots to use release() instead, which moves
the string.

Reviewed-by: default avatarKeith Seitz <keiths@redhat.com>
Reviewed-by: default avatarLancelot Six <lancelot.six@amd.com>
parent 5437a944
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment