auto spl_header = new wxBoxSizer (wxHORIZONTAL);
{
- wxStaticText* m = new StaticText (this, "Playlists");
+ auto m = new StaticText (this, "Playlists");
m->SetFont (subheading_font);
spl_header->Add (m, 1, wxALIGN_CENTER_VERTICAL);
}
auto content_header = new wxBoxSizer (wxHORIZONTAL);
{
- wxStaticText* m = new StaticText (this, "Content");
+ auto m = new StaticText (this, "Content");
m->SetFont (subheading_font);
content_header->Add (m, 1, wxALIGN_CENTER_VERTICAL);
}
_playlists.clear ();
- for (directory_iterator i = directory_iterator(*dir); i != directory_iterator(); ++i) {
+ for (auto i: directory_iterator(*dir)) {
try {
- if (is_regular_file(i->path()) && i->path().extension() == ".xml") {
+ if (is_regular_file(i.path()) && i.path().extension() == ".xml") {
SPL spl;
- spl.read (i->path(), _content_view);
+ spl.read (i.path(), _content_view);
_playlists.push_back (spl);
}
} catch (exception& e) {
if (!kdm_dir) {
return {};
}
- for (directory_iterator i = directory_iterator(*kdm_dir); i != directory_iterator(); ++i) {
+ for (auto i: directory_iterator(*kdm_dir)) {
try {
- if (file_size(i->path()) < MAX_KDM_SIZE) {
- dcp::EncryptedKDM kdm (dcp::file_to_string(i->path()));
+ if (file_size(i.path()) < MAX_KDM_SIZE) {
+ dcp::EncryptedKDM kdm (dcp::file_to_string(i.path()));
if (kdm.cpl_id() == dcp->cpl()) {
return kdm;
}
/* Hey well */
}
}
- return optional<dcp::EncryptedKDM>();
+ return {};
}
void