GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||
GeezerVison is showing github.com — src: fix coverity coverity warning by mhdawson · Pull Request #50846 · nodejs/node Conversation
|
There was an error while loading. Please reload this page.
|
Coverity warning std::vector<Local<String>> params = {
1464 String::NewFromUtf8(isolate, "exports").ToLocalChecked(),
1465 String::NewFromUtf8(isolate, "require").ToLocalChecked(),
1466 String::NewFromUtf8(isolate, "module").ToLocalChecked(),
1467 String::NewFromUtf8(isolate, "__filename").ToLocalChecked(),
1468 String::NewFromUtf8(isolate, "__dirname").ToLocalChecked()};
1469
1470 TryCatchScope try_catch(env);
1471
1472 ContextifyContext::CompileFunctionAndCacheResult(env,
1473 context,
1474 &source,
CID 329955 (#1 of 1): COPY_INSTEAD_OF_MOVE (COPY_INSTEAD_OF_MOVE)
1. copy_constructor_call: params is passed-by-value as parameter to CompileFunctionAndCacheResult when it could be moved instead.
Use std::move(params) instead of params.
1475 params,
1476 std::vector<Local<Object>>(),
1477 options,
1478 true,
1479 id_symbol,
1480 try_catch);I think the suggested std::move will avoid copying the contents of the vector. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Nit: duplicate word in commit message |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
- reduce copying by using std::move Signed-off-by: Michael Dawson <[email protected]>
There was an error while loading. Please reload this page.
|
@tniessen thanks, fixed commit message. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Landed in 6dbf678 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
- reduce copying by using std::move Signed-off-by: Michael Dawson <[email protected]> PR-URL: nodejs#50846 Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Marco Ippolito <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
- reduce copying by using std::move Signed-off-by: Michael Dawson <[email protected]> PR-URL: #50846 Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Marco Ippolito <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
- reduce copying by using std::move Signed-off-by: Michael Dawson <[email protected]> PR-URL: #50846 Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Marco Ippolito <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
- reduce copying by using std::move Signed-off-by: Michael Dawson <[email protected]> PR-URL: #50846 Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Marco Ippolito <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
- reduce copying by using std::move Signed-off-by: Michael Dawson <[email protected]> PR-URL: #50846 Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Marco Ippolito <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
- reduce copying by using std::move Signed-off-by: Michael Dawson <[email protected]> PR-URL: #50846 Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Marco Ippolito <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
- reduce copying by using std::move Signed-off-by: Michael Dawson <[email protected]> PR-URL: #50846 Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Marco Ippolito <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.