--- branches/development/src/io/RestReader.cpp 2012/09/13 14:10:11 1798 +++ branches/development/src/io/RestReader.cpp 2013/05/17 14:41:42 1875 @@ -35,7 +35,7 @@ * * [1] Meineke, et al., J. Comp. Chem. 26, 252-271 (2005). * [2] Fennell & Gezelter, J. Chem. Phys. 124, 234104 (2006). - * [3] Sun, Lin & Gezelter, J. Chem. Phys. 128, 24107 (2008). + * [3] Sun, Lin & Gezelter, J. Chem. Phys. 128, 234107 (2008). * [4] Kuang & Gezelter, J. Chem. Phys. 133, 164101 (2010). * [5] Vardeman, Stocker & Gezelter, J. Chem. Theory Comput. 7, 834 (2011). */ @@ -68,7 +68,7 @@ namespace OpenMD { namespace OpenMD { void RestReader::scanFile(){ - int lineNo = 0; + std::streampos prevPos; std::streampos currPos; @@ -82,7 +82,7 @@ namespace OpenMD { prevPos = currPos; bool foundOpenSnapshotTag = false; - + int lineNo = 0; while(!foundOpenSnapshotTag && inFile_->getline(buffer, bufferSize)) { ++lineNo; @@ -368,7 +368,6 @@ namespace OpenMD { // is this io restrained? GenericData* data = sd->getPropertyByName("Restraint"); - ObjectRestraint* oRest; if (data != NULL) { // make sure we can reinterpret the generic data as restraint data: @@ -376,7 +375,7 @@ namespace OpenMD { if (restData != NULL) { // make sure we can reinterpet the restraint data as a pointer to // an ObjectRestraint: - oRest = dynamic_cast(restData->getData()); + ObjectRestraint* oRest = dynamic_cast(restData->getData()); if (oRest != NULL) { if (sd->isDirectional()) { oRest->setReferenceStructure(pos, q.toRotationMatrix3());