X-Git-Url: http://git.treefish.org/~alex/phys/latlib.git/blobdiff_plain/a1ba813d03f4fb8a40adae184fc4ab4f0271d55a..b3e5f37ca561e20879f984d53db68adae89ef413:/hypercache.cpp?ds=inline diff --git a/hypercache.cpp b/hypercache.cpp index b025ba6..2d38b21 100644 --- a/hypercache.cpp +++ b/hypercache.cpp @@ -71,10 +71,12 @@ string hypercache::fileOfPath(const string& dressedfile) { return dressedfile.substr(dressedfile.find_last_of("\\/")+1); } -bool hypercache::readC() { - bool readret; +int hypercache::readC() { + int readret; - if ( readret = C->readConfig(&parentConfigs) ) + readret = C->readConfig(&parentConfigs); + + if ( readret == -1 ) activeCFile = fileOfPath(C->getInFileName()); else activeCFile = ""; @@ -96,15 +98,17 @@ void hypercache::writeO() { O->writeConfig(); } -bool hypercache::readO() { - bool readret; +int hypercache::readO() { + int readret; + + readret = O->readConfig(); - if ( readret = O->readConfig() ) { + if ( readret == -1 ) { unsigned long *parentconfig = (unsigned long*)O->getHeader("concurrent_cfile"); if ( parentconfig != NULL ) addParentConfig(parentconfig); } - + return readret; }