File tree Expand file tree Collapse file tree 2 files changed +5
-6
lines changed
Expand file tree Collapse file tree 2 files changed +5
-6
lines changed Original file line number Diff line number Diff line change 44namespace 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:
Original file line number Diff line number Diff line change 55
66namespace 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
You can’t perform that action at this time.
0 commit comments