Roll our own qUtf8Printable()?

Thiago Macieira thiago at macieira.org
Sun Feb 25 18:19:48 PST 2018


On domingo, 25 de fevereiro de 2018 17:13:11 PST Thiago Macieira wrote:
> But there's another option, which is to avoid a copy of the QString if the
> input is already a QString. Let me try a few variations of possible
> solutions and compile Qt to see what happens.
> 
> I'll BRB.

Change to Qt: https://codereview.qt-project.org/221331

Here's the implementation details: https://godbolt.org/g/voLGhQ

As you can see from the assembly output, it does not create a copy anymore, 
but does work for any and all types convertible to QString (including QString 
itself).

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel Open Source Technology Center





More information about the subsurface mailing list