Commit 7514bd8f authored by jan.koester's avatar jan.koester
Browse files

windows fixed

parent b8dad6e5
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -169,13 +169,13 @@ size_t confplus::Config::ConfigData::getElements() const{
}

#ifdef Windows
confplus::Config::Config(const char* path) {
confplus::Config::Config(const std::string &path) {
    firstData = nullptr;

    int i = 0,ii=strlen(path);
    int i = 0,ii=path.length();

    while (path[i++] != ':') {
        if (i == strlen(path)) {
        if (i == path.length() ){
            ConfException err;
            err[ConfException::Critical] << "Cannot load library not delimter for protocol ";
            throw err;
@@ -192,7 +192,7 @@ confplus::Config::Config(const char* path) {

    std::string mpath= CONFIGPATH;

    std::copy(path , path + (i-1), std::back_inserter(mpath));
    std::copy(path.begin(), path.begin() + (i - 1), std::back_inserter(mpath));

    mpath += ".dll";

@@ -202,7 +202,7 @@ confplus::Config::Config(const char* path) {

    std::string confpath;

    std::copy(path + ++i, path + strlen(path), std::inserter<std::string>(confpath, confpath.begin()));
    std::copy(path.begin()+(++i), path.end(), std::inserter<std::string>(confpath, confpath.begin()));

    _BackendData = LoadLibrary(TEXT(mpath.c_str()));
    if (!_BackendData) {