Skip to content

Commit

Permalink
Updated variables based on static analysis.
Browse files Browse the repository at this point in the history
  • Loading branch information
pkulchenko committed Apr 16, 2015
1 parent 06d6340 commit 6596d3a
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 9 deletions.
1 change: 0 additions & 1 deletion src/editor/commandbar.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
local maxlines = 8
local row_height = 46
local row_width = 450
local win = ide.osname == 'Windows'

function CommandBarShow(params)
local onDone, onUpdate, onItem, onSelection, defaultText, selectedText =
Expand Down
2 changes: 1 addition & 1 deletion src/editor/commands.lua
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,7 @@ function SaveOnExit(allow_cancel)
-- if all documents have been saved or refused to save, then mark those that
-- are still modified as not modified (they don't need to be saved)
-- to keep their tab names correct
for id, document in pairs(openDocuments) do
for _, document in pairs(openDocuments) do
if document.isModified then document:SetModified(false) end
end

Expand Down
4 changes: 2 additions & 2 deletions src/editor/menu_help.lua
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ local helpMenu = wx.wxMenu{
-- do not translate Help menu on Mac as it won't merge with "standard" menus
menuBar:Append(helpMenu, ide.osname == 'Macintosh' and "&Help" or TR("&Help"))

local function DisplayAbout(event)
local function displayAbout(event)
local logo = ide:GetAppName().."/"..GetIDEString("logo")
local logoimg = wx.wxFileName(logo):FileExists() and
([[<tr><td><img src="%s"></td></tr>]]):format(logo) or ""
Expand Down Expand Up @@ -111,7 +111,7 @@ local function DisplayAbout(event)
dlg:Destroy()
end

frame:Connect(ID_ABOUT, wx.wxEVT_COMMAND_MENU_SELECTED, DisplayAbout)
frame:Connect(ID_ABOUT, wx.wxEVT_COMMAND_MENU_SELECTED, displayAbout)
for item, page in pairs(urls) do
frame:Connect(item, wx.wxEVT_COMMAND_MENU_SELECTED,
function() wx.wxLaunchDefaultBrowser(url..page, 0) end)
Expand Down
3 changes: 1 addition & 2 deletions src/editor/menu_project.lua
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ function ProjectUpdateInterpreters()
table.sort(names)

interpreters = {}
for i, file in ipairs(names) do
for _, file in ipairs(names) do
local inter = ide.interpreters[file]
local id = ID("debug.interpreter."..file)
inter.fname = file
Expand Down Expand Up @@ -322,7 +322,6 @@ frame:Connect(ID_ATTACHDEBUG, wx.wxEVT_COMMAND_MENU_SELECTED,
end)
frame:Connect(ID_ATTACHDEBUG, wx.wxEVT_UPDATE_UI,
function (event)
local editor = GetEditor()
event:Enable(ide.interpreter and ide.interpreter.fattachdebug and true or false)
ide.frame.menuBar:Check(event:GetId(), debugger.listening and true or false)
end)
Expand Down
2 changes: 1 addition & 1 deletion src/editor/package.lua
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ function ide:ExecuteCommand(cmd, wdir, callback, endcallback)
end

function ide:CreateImageList(group, ...)
local log = wx.wxLogNull() -- disable error reporting in popup
local _ = wx.wxLogNull() -- disable error reporting in popup
local size = wx.wxSize(16,16)
local imglist = wx.wxImageList(16,16)
for i = 1, select('#', ...) do
Expand Down
4 changes: 2 additions & 2 deletions src/editor/proto.lua
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,6 @@ ide.proto.Debugger = {__index = {
}}

ide.proto.ID = {
__index = function(t, id) return _G['ID_'..id] end,
__call = function(t, id) return IDgen(id) end,
__index = function(_, id) return _G['ID_'..id] end,
__call = function(_, id) return IDgen(id) end,
}

0 comments on commit 6596d3a

Please sign in to comment.