chaning return type of getSettingsDir and setSettingsDir to std::string

This commit is contained in:
Erik Frojdh
2018-05-24 17:47:12 +02:00
parent e65b416215
commit 301600e720
5 changed files with 17 additions and 52 deletions

View File

@ -483,9 +483,9 @@ class slsDetector : public slsDetectorUtils, public energyConversion {
/* I/O */
/** returns the detector trimbit/settings directory \sa sharedSlsDetector */
char* getSettingsDir() {return thisDetector->settingsDir;};
std::string getSettingsDir() {return std::string(thisDetector->settingsDir);};
/** sets the detector trimbit/settings directory \sa sharedSlsDetector */
char* setSettingsDir(string s) {sprintf(thisDetector->settingsDir, s.c_str()); return thisDetector->settingsDir;};
std::string setSettingsDir(string s) {sprintf(thisDetector->settingsDir, s.c_str()); return thisDetector->settingsDir;};

View File

@ -3031,9 +3031,9 @@ string slsDetectorCommand::cmdSettingsDir(int narg, char *args[], int action){
if (action==PUT_ACTION) {
myDet->setSettingsDir(string(args[1]));
}
if (myDet->getSettingsDir()==NULL)
if (myDet->getSettingsDir()=="")
return string("undefined");
return string(myDet->getSettingsDir());
return myDet->getSettingsDir();
}

View File

@ -405,10 +405,10 @@ class slsDetectorUtils : public slsDetectorActions, public postProcessing {
/**
returns the detector trimbit/settings directory
*/
virtual char* getSettingsDir()=0;
virtual std::string getSettingsDir()=0;
/** sets the detector trimbit/settings directory */
virtual char* setSettingsDir(std::string s)=0;
virtual std::string setSettingsDir(std::string s)=0;
/**
returns the location of the calibration files