removed printf with same source and dest

This commit is contained in:
Erik Frojdh 2018-10-16 15:50:51 +02:00
parent 3c9b1884d3
commit b5a2c91873

View File

@ -442,18 +442,17 @@ void slsReceiverImplementation::setDetectorHostname(const char *c){
void slsReceiverImplementation::setMultiDetectorSize(const int* size) { void slsReceiverImplementation::setMultiDetectorSize(const int* size) {
FILE_LOG(logDEBUG) << __AT__ << " starting"; FILE_LOG(logDEBUG) << __AT__ << " starting";
char message[100]; std::string message = "Detector Size: (";
strcpy(message, "Detector Size: (");
for (int i = 0; i < MAX_DIMENSIONS; ++i) { for (int i = 0; i < MAX_DIMENSIONS; ++i) {
if (myDetectorType == EIGER && (!i)) if (myDetectorType == EIGER && (!i))
numDet[i] = size[i]*2; numDet[i] = size[i]*2;
else else
numDet[i] = size[i]; numDet[i] = size[i];
sprintf(message,"%s%d",message,numDet[i]); message += std::to_string(numDet[i]);
if (i < MAX_DIMENSIONS-1 ) if (i < MAX_DIMENSIONS-1 )
strcat(message,","); message += ", ";
} }
strcat(message,")"); message += ")";
FILE_LOG(logINFO) << message; FILE_LOG(logINFO) << message;
} }