Switch to unified view

a/src/rcldb/stemdb.cpp b/src/rcldb/stemdb.cpp
...
...
36
36
37
namespace Rcl {
37
namespace Rcl {
38
namespace StemDb {
38
namespace StemDb {
39
39
40
40
41
static const string stemdirstem = "stem_";
41
static const string cstr_stemdirstem = "stem_";
42
42
43
/// Compute name of stem db for given base database and language
43
/// Compute name of stem db for given base database and language
44
static string stemdbname(const string& dbdir, const string& lang)
44
static string stemdbname(const string& dbdir, const string& lang)
45
{
45
{
46
    return path_cat(dbdir, stemdirstem + lang);
46
    return path_cat(dbdir, cstr_stemdirstem + lang);
47
}
47
}
48
48
49
list<string> getLangs(const string& dbdir)
49
list<string> getLangs(const string& dbdir)
50
{
50
{
51
    string pattern = stemdirstem + "*";
51
    string pattern = cstr_stemdirstem + "*";
52
    list<string> dirs = path_dirglob(dbdir, pattern);
52
    list<string> dirs = path_dirglob(dbdir, pattern);
53
    for (list<string>::iterator it = dirs.begin(); it != dirs.end(); it++) {
53
    for (list<string>::iterator it = dirs.begin(); it != dirs.end(); it++) {
54
    *it = path_basename(*it);
54
    *it = path_basename(*it);
55
    *it = it->substr(stemdirstem.length(), string::npos);
55
    *it = it->substr(cstr_stemdirstem.length(), string::npos);
56
    }
56
    }
57
    return dirs;
57
    return dirs;
58
}
58
}
59
59
60
bool deleteDb(const string& dbdir, const string& lang)
60
bool deleteDb(const string& dbdir, const string& lang)