[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] (no subject)
From: |
Greg Chicares |
Subject: |
[lmi-commits] (no subject) |
Date: |
Tue, 31 May 2016 21:06:22 +0000 (UTC) |
branch: master
commit da82364545ee35972d82b0f3f5a22dc520a70651
Author: Gregory W. Chicares <address@hidden>
Date: Tue May 31 20:42:17 2016 +0000
Simplify: any 'skin*.xrc' file is a skin
---
ce_skin_name.cpp | 13 ++-----------
1 file changed, 2 insertions(+), 11 deletions(-)
diff --git a/ce_skin_name.cpp b/ce_skin_name.cpp
index 6945b42..d0e0d53 100644
--- a/ce_skin_name.cpp
+++ b/ce_skin_name.cpp
@@ -24,6 +24,7 @@
#include "alert.hpp"
#include "facets.hpp"
#include "global_settings.hpp"
+#include "miscellany.hpp" // begins_with()
#include "path_utility.hpp" // fs::path inserter
#include <boost/filesystem/convenience.hpp>
@@ -31,7 +32,6 @@
#include <boost/filesystem/path.hpp>
#include <algorithm> // std::find()
-#include <cstring> // std::strlen()
namespace
{
@@ -48,19 +48,10 @@ std::vector<std::string> fetch_skin_names()
continue;
}
std::string const name(i->leaf());
- // Skin files are expected to be called "skin_something.xrc" with the
- // exception of "skin.xrc".
- static char const* skin_prefix = "skin";
- static std::size_t const skin_prefix_len = std::strlen(skin_prefix);
- if(name.compare(0, skin_prefix_len, skin_prefix) != 0)
+ if(!begins_with(name, "skin"))
{
continue;
}
- if(fs::basename(*i).length() > skin_prefix_len &&
name[skin_prefix_len] != '_')
- {
- continue;
- }
-
names.push_back(name);
}
- [lmi-commits] [lmi] master updated (cdd9aa4 -> 37c5a98), Greg Chicares, 2016/05/31
- [lmi-commits] (no subject), Greg Chicares, 2016/05/31
- [lmi-commits] (no subject), Greg Chicares, 2016/05/31
- [lmi-commits] (no subject),
Greg Chicares <=
- [lmi-commits] (no subject), Greg Chicares, 2016/05/31
- [lmi-commits] (no subject), Greg Chicares, 2016/05/31
- [lmi-commits] (no subject), Greg Chicares, 2016/05/31