We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 53fd9cc commit 1839835Copy full SHA for 1839835
src/gen/osm2pgsql-gen.cpp
@@ -60,7 +60,7 @@
60
// context object.
61
// NOLINTNEXTLINE(cppcoreguidelines-macro-usage)
62
#define TRAMPOLINE(func_name, lua_name) \
63
- static int lua_trampoline_##func_name(lua_State *lua_state) \
+ int lua_trampoline_##func_name(lua_State *lua_state) \
64
{ \
65
try { \
66
return static_cast<genproc_t *>(luaX_get_context(lua_state)) \
src/lua-utils.cpp
@@ -33,8 +33,12 @@ void *luaX_get_context(lua_State *lua_state) noexcept
33
34
#else
35
36
+namespace {
37
+
38
// Unique key for lua registry
-static char const *osm2pgsql_output_flex = "osm2pgsql_output_flex";
39
+constexpr char const *const osm2pgsql_output_flex = "osm2pgsql_output_flex";
40
41
+} // anonymous namespace
42
43
void luaX_set_context(lua_State *lua_state, void *ptr) noexcept
44
{
src/output-flex.cpp
@@ -49,16 +49,18 @@
49
#include <string>
50
#include <string_view>
51
52
53
54
// Mutex used to coordinate access to Lua code
-static std::mutex lua_mutex;
55
+std::mutex lua_mutex;
56
57
// Lua can't call functions on C++ objects directly. This macro defines simple
58
// C "trampoline" functions which are called from Lua which get the current
59
// context (the output_flex_t object) and call the respective function on the
return static_cast<output_flex_t *>(luaX_get_context(lua_state)) \
@@ -98,6 +100,8 @@ TRAMPOLINE(expire_output_schema, schema)
98
100
TRAMPOLINE(expire_output_table, table)
99
101
TRAMPOLINE(expire_output_tostring, __tostring)
102
103
104
105
prepared_lua_function_t::prepared_lua_function_t(lua_State *lua_state,
106
calling_context context,
107
char const *name, int nresults)
src/properties.cpp
@@ -17,7 +17,11 @@
17
#include <cassert>
18
#include <cstdlib>
19
20
-static constexpr char const *const properties_table = "osm2pgsql_properties";
21
22
+constexpr char const *const properties_table = "osm2pgsql_properties";
23
24
25
26
properties_t::properties_t(connection_params_t connection_params,
27
std::string schema)
src/wkb.cpp
@@ -576,7 +576,9 @@ geom::geometry_t ewkb_to_geom(std::string_view wkb)
576
return geom;
577
}
578
579
-static constexpr std::array<char, 256> const hex_table = {
580
581
+constexpr std::array<char, 256> const hex_table = {
582
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
583
584
@@ -587,6 +589,8 @@ static constexpr std::array<char, 256> const hex_table = {
587
589
0, 10, 11, 12, 13, 14, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0,
588
590
};
591
592
593
594
unsigned char decode_hex_char(char c) noexcept
595
596
// NOLINTNEXTLINE(cppcoreguidelines-pro-bounds-constant-array-index)
0 commit comments