Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-12238

Refactoring C++: Creator should automatically determine whether it's necessary to use a ref or not

XMLWordPrintable

    • Icon: Suggestion Suggestion
    • Resolution: Duplicate
    • Icon: P3: Somewhat important P3: Somewhat important
    • None
    • Qt Creator 3.2.0-beta1
    • C/C++/Obj-C++ Support
    • None

      Steps to reproduce:

      • create Plain C++ project
      • add a simple if/if-else/do-while/while block e.g.
        int dummy = 0;
        if (dummy < 10)
            ++dummy;
        
      • mark the first keyword (if, do, while)
      • right click on it and invoke 'Refactor' -> 'Extract Function', give it a name and hit 'OK'
      • resulting function uses pass by value instead of pass by reference although dummy is modified inside the function and is scalar type

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            kandeler Christian Kandeler
            cstenger Christian Stenger
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes