Skip to content

Commit 076ec18

Browse files
author
okay
committed
[rmkit] make single file header work in impl/no-impl modes
1 parent 13290f6 commit 076ec18

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

src/rmkit/ui/reflow.cpy

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
namespace ui:
55
class ReflowLayout: public ui::Layout:
66
public:
7-
static unordered_map<Scene, vector<ReflowLayout*>> scene_to_layouts
7+
static unordered_map<Scene, vector<ReflowLayout*>> scene_to_layouts = {}
88
vector<ReflowLayout*> layouts
99

1010
class PackedChild:
@@ -75,7 +75,6 @@ namespace ui:
7575
sl := ReflowLayout::add(w)
7676
self.center.push_back({sl, NULL, padding})
7777
;
78-
unordered_map<Scene, vector<ReflowLayout*>> ReflowLayout::scene_to_layouts = {}
7978

8079
class HorizontalReflow: public ReflowLayout:
8180
public:

src/rmkit/util/lsdir.cpy

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
namespace util:
77

8-
void sort_by_modified_date(vector<string> &filenames, string dirname):
8+
static void sort_by_modified_date(vector<string> &filenames, string dirname):
99
struct stat buf
1010
vector<tuple<int, string>> entries
1111
for (auto filename : filenames)
@@ -14,16 +14,16 @@ namespace util:
1414
if(stat(full_path.c_str(), &buf))
1515
debug "Failed stat() on ", full_path
1616
continue
17-
entries.push_back({buf.st_mtime, filename})
17+
entries.push_back({buf.st_mtime, filename})
1818

1919
sort(entries.begin(), entries.end())
2020
filenames.clear()
2121
for (auto e : entries)
2222
filenames.push_back(std::get<1>(e))
23-
23+
2424
reverse(filenames.begin(), filenames.end())
2525

26-
vector<string> lsdir(string dirname, string ext=""):
26+
static vector<string> lsdir(string dirname, string ext=""):
2727
DIR *dir
2828
struct dirent *ent
2929

0 commit comments

Comments
 (0)