mirror of
https://github.com/google/blockly.git
synced 2026-01-10 10:27:08 +01:00
Resolve warnings in generator code (#3350)
This commit is contained in:
@@ -269,7 +269,7 @@ Blockly.PHP['lists_setIndex'] = function(block) {
|
||||
return '';
|
||||
}
|
||||
var listVar = Blockly.PHP.variableDB_.getDistinctName(
|
||||
'tmp_list', Blockly.Variables.NAME_TYPE);
|
||||
'tmp_list', Blockly.VARIABLE_CATEGORY_NAME);
|
||||
var code = listVar + ' = &' + list + ';\n';
|
||||
list = listVar;
|
||||
return code;
|
||||
@@ -340,7 +340,7 @@ Blockly.PHP['lists_setIndex'] = function(block) {
|
||||
Blockly.PHP.ORDER_REFERENCE) || 'array()';
|
||||
var code = cacheList();
|
||||
var xVar = Blockly.PHP.variableDB_.getDistinctName(
|
||||
'tmp_x', Blockly.Variables.NAME_TYPE);
|
||||
'tmp_x', Blockly.VARIABLE_CATEGORY_NAME);
|
||||
code += xVar + ' = rand(0, count(' + list + ')-1);\n';
|
||||
if (mode == 'SET') {
|
||||
code += list + '[' + xVar + '] = ' + value + ';\n';
|
||||
|
||||
Reference in New Issue
Block a user