Remove unneeded String() and str() calls.

String literals in JS and Python don’t need to be coerced to strings.
This commit is contained in:
Neil Fraser
2018-09-25 12:34:45 -07:00
committed by Neil Fraser
parent 346b24aa74
commit f3a76cc288
4 changed files with 52 additions and 11 deletions

View File

@@ -252,11 +252,11 @@ Blockly.JavaScript['lists_setIndex'] = function(block) {
/**
* Returns an expression calculating the index into a list.
* @private
* @param {string} listName Name of the list, used to calculate length.
* @param {string} where The method of indexing, selected by dropdown in Blockly
* @param {string=} opt_at The optional offset when indexing from start/end.
* @return {string} Index expression.
* @private
*/
Blockly.JavaScript.lists.getIndex_ = function(listName, where, opt_at) {
if (where == 'FIRST') {