Changeset 167196 in webkit


Ignore:
Timestamp:
Apr 13, 2014 7:18:48 AM (10 years ago)
Author:
zandobersek@gmail.com
Message:

Remove unnecessary uses of std::move() in return statements
https://bugs.webkit.org/show_bug.cgi?id=131457

Reviewed by Darin Adler.

Don't use std::move() in return statements unless necessary as it inhibits
named return value optimizations as performed by compilers.

  • Modules/battery/BatteryManager.cpp:

(WebCore::BatteryManager::create):

  • html/FormController.cpp:

(WebCore::FormController::createSavedFormStateMap):

  • html/canvas/WebGLRenderingContext.cpp:

(WebCore::WebGLRenderingContext::create):

  • platform/RemoteCommandListener.cpp:

(WebCore::RemoteCommandListener::create):

  • platform/graphics/ca/GraphicsLayerCA.cpp:

(WebCore::GraphicsLayer::create):

  • platform/ios/RemoteCommandListenerIOS.mm:

(WebCore::RemoteCommandListener::create):

  • rendering/RenderGrid.cpp:

(WebCore::RenderGrid::GridIterator::nextEmptyGridArea):

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::setupFilters):

  • rendering/style/CounterDirectives.cpp:

(WebCore::clone):

Location:
trunk/Source/WebCore
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r167195 r167196  
     12014-04-13  Zan Dobersek  <zdobersek@igalia.com>
     2
     3        Remove unnecessary uses of std::move() in return statements
     4        https://bugs.webkit.org/show_bug.cgi?id=131457
     5
     6        Reviewed by Darin Adler.
     7
     8        Don't use std::move() in return statements unless necessary as it inhibits
     9        named return value optimizations as performed by compilers.
     10
     11        * Modules/battery/BatteryManager.cpp:
     12        (WebCore::BatteryManager::create):
     13        * html/FormController.cpp:
     14        (WebCore::FormController::createSavedFormStateMap):
     15        * html/canvas/WebGLRenderingContext.cpp:
     16        (WebCore::WebGLRenderingContext::create):
     17        * platform/RemoteCommandListener.cpp:
     18        (WebCore::RemoteCommandListener::create):
     19        * platform/graphics/ca/GraphicsLayerCA.cpp:
     20        (WebCore::GraphicsLayer::create):
     21        * platform/ios/RemoteCommandListenerIOS.mm:
     22        (WebCore::RemoteCommandListener::create):
     23        * rendering/RenderGrid.cpp:
     24        (WebCore::RenderGrid::GridIterator::nextEmptyGridArea):
     25        * rendering/RenderLayer.cpp:
     26        (WebCore::RenderLayer::setupFilters):
     27        * rendering/style/CounterDirectives.cpp:
     28        (WebCore::clone):
     29
    1302014-04-13  Commit Queue  <commit-queue@webkit.org>
    231
  • trunk/Source/WebCore/Modules/battery/BatteryManager.cpp

    r165950 r167196  
    3737    auto batteryManager = adoptRef(*new BatteryManager(navigator));
    3838    batteryManager.get().suspendIfNeeded();
    39     return std::move(batteryManager);
     39    return batteryManager;
    4040}
    4141
  • trunk/Source/WebCore/html/FormController.cpp

    r166498 r167196  
    408408        formState->appendControlState(control->name(), control->type(), control->saveFormControlState());
    409409    }
    410     return std::move(stateMap);
     410    return stateMap;
    411411}
    412412
  • trunk/Source/WebCore/html/canvas/WebGLRenderingContext.cpp

    r167126 r167196  
    440440        std::unique_ptr<WebGLRenderingContext> renderingContext(new WebGLRenderingContext(canvas, attributes));
    441441        renderingContext->suspendIfNeeded();
    442         return std::move(renderingContext);
     442        return renderingContext;
    443443    }
    444444
     
    458458    renderingContext->suspendIfNeeded();
    459459
    460     return std::move(renderingContext);
     460    return renderingContext;
    461461}
    462462
  • trunk/Source/WebCore/platform/RemoteCommandListener.cpp

    r165676 r167196  
    3232std::unique_ptr<RemoteCommandListener> RemoteCommandListener::create(RemoteCommandListenerClient& client)
    3333{
    34     return std::move(std::unique_ptr<RemoteCommandListener>(new RemoteCommandListener(client)));
     34    return std::make_unique<RemoteCommandListener>(client);
    3535}
    3636#endif
  • trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp

    r167138 r167196  
    313313    graphicsLayer->initialize();
    314314
    315     return std::move(graphicsLayer);
     315    return graphicsLayer;
    316316}
    317317
  • trunk/Source/WebCore/platform/ios/RemoteCommandListenerIOS.mm

    r166101 r167196  
    4242std::unique_ptr<RemoteCommandListener> RemoteCommandListener::create(RemoteCommandListenerClient& client)
    4343{
    44     return std::move(std::unique_ptr<RemoteCommandListener>(new RemoteCommandListenerIOS(client)));
     44    return std::unique_ptr<RemoteCommandListener>(new RemoteCommandListenerIOS(client));
    4545}
    4646
  • trunk/Source/WebCore/rendering/RenderGrid.cpp

    r167134 r167196  
    131131                // Advance the iterator to avoid an infinite loop where we would return the same grid area over and over.
    132132                ++varyingTrackIndex;
    133                 return std::move(result);
     133                return result;
    134134            }
    135135        }
  • trunk/Source/WebCore/rendering/RenderLayer.cpp

    r167079 r167196  
    39683968        // Note that we will still apply the clipping on the final rendering of the filter.
    39693969        paintingInfo.clipToDirtyRect = !filterInfo->renderer()->hasFilterThatMovesPixels();
    3970         return std::move(filterPainter);
     3970        return filterPainter;
    39713971    }
    39723972    return nullptr;
  • trunk/Source/WebCore/rendering/style/CounterDirectives.cpp

    r166489 r167196  
    3737    auto result = std::make_unique<CounterDirectiveMap>();
    3838    *result = counterDirectives;
    39     return std::move(result);
     39    return result;
    4040}
    4141
Note: See TracChangeset for help on using the changeset viewer.