citra/src/video_core/shader
Lioncash b6dcb1ae4d shader/shader_ir: Make Comment() take a std::string by value
This allows for forming comment nodes without making unnecessary copies
of the std::string instance.

e.g. previously:

Comment(fmt::format("Base address is c[0x{:x}][0x{:x}]",
        cbuf->GetIndex(), cbuf_offset));

Would result in a copy of the string being created, as CommentNode()
takes a std::string by value (a const ref passed to a value parameter
results in a copy).

Now, only one instance of the string is ever moved around. (fmt::format
returns a std::string, and since it's returned from a function by value,
this is a prvalue (which can be treated like an rvalue), so it's moved
into Comment's string parameter), we then move it into the CommentNode
constructor, which then moves the string into its member variable).
2019-05-23 03:01:55 -03:00
..
decode shader/decode/*: Add missing newline to files lacking them 2019-05-23 02:55:52 -03:00
decode.cpp video_core: Silent -Wswitch warnings 2019-04-18 15:54:39 -03:00
shader_ir.cpp shader/shader_ir: Make Comment() take a std::string by value 2019-05-23 03:01:55 -03:00
shader_ir.h shader/shader_ir: Make Comment() take a std::string by value 2019-05-23 03:01:55 -03:00
track.cpp shader/shader_ir: Mark tracking functions as const member functions 2019-05-19 08:23:09 -04:00