summaryrefslogtreecommitdiff
path: root/builtin/profiler/reporter.lua
diff options
context:
space:
mode:
authorShadowNinja <shadowninja@minetest.net>2014-12-12 14:49:19 -0500
committerShadowNinja <shadowninja@minetest.net>2017-05-06 15:33:19 -0400
commit43d1f375d18a2fbc547a9b4f23d1354d645856ca (patch)
tree15de6977737b440b9d265f85dc1fe3c71e996a45 /builtin/profiler/reporter.lua
parenta024042bf5ad487685e952da7b96ffa845cd7731 (diff)
downloadminetest-43d1f375d18a2fbc547a9b4f23d1354d645856ca.tar.gz
minetest-43d1f375d18a2fbc547a9b4f23d1354d645856ca.tar.bz2
minetest-43d1f375d18a2fbc547a9b4f23d1354d645856ca.zip
Use a settings object for the main settings
This unifies the settings APIs. This also unifies the sync and async registration APIs, since the async registration API did not support adding non-functions to the API table.
Diffstat (limited to 'builtin/profiler/reporter.lua')
-rw-r--r--builtin/profiler/reporter.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/builtin/profiler/reporter.lua b/builtin/profiler/reporter.lua
index 5b38ed4df..fed47a36b 100644
--- a/builtin/profiler/reporter.lua
+++ b/builtin/profiler/reporter.lua
@@ -18,7 +18,7 @@
local DIR_DELIM, LINE_DELIM = DIR_DELIM, "\n"
local table, unpack, string, pairs, io, os = table, unpack, string, pairs, io, os
local rep, sprintf, tonumber = string.rep, string.format, tonumber
-local core, setting_get = core, core.setting_get
+local core, settings = core, core.settings
local reporter = {}
---
@@ -229,7 +229,7 @@ end
local worldpath = core.get_worldpath()
local function get_save_path(format, filter)
- local report_path = setting_get("profiler.report_path") or ""
+ local report_path = settings:get("profiler.report_path") or ""
if report_path ~= "" then
core.mkdir(sprintf("%s%s%s", worldpath, DIR_DELIM, report_path))
end
@@ -249,7 +249,7 @@ end
--
function reporter.save(profile, format, filter)
if not format or format == "" then
- format = setting_get("profiler.default_report_format") or "txt"
+ format = settings:get("profiler.default_report_format") or "txt"
end
if filter == "" then
filter = nil