Import Geant4 11.3.0 source tree
This commit is contained in:
@@ -446,9 +446,9 @@ void G4UIcontrolMessenger::SetNewValue(G4UIcommand* command, G4String newValue)
|
||||
}
|
||||
if (command == getValCmd) {
|
||||
G4Tokenizer next(newValue);
|
||||
G4String aliName = next();
|
||||
G4String com = next();
|
||||
G4String curVal = UI->GetCurrentValues(com);
|
||||
const G4String& aliName = next();
|
||||
const G4String& com = next();
|
||||
const G4String& curVal = UI->GetCurrentValues(com);
|
||||
if (!(curVal.empty())) {
|
||||
G4String theValue = curVal;
|
||||
G4String iIdx = next();
|
||||
@@ -469,7 +469,7 @@ void G4UIcontrolMessenger::SetNewValue(G4UIcommand* command, G4String newValue)
|
||||
}
|
||||
if (command == shellCommand) {
|
||||
command->ResetFailure();
|
||||
int rc = system(newValue);
|
||||
G4int rc = system(newValue);
|
||||
if (rc < 0) {
|
||||
G4ExceptionDescription ed;
|
||||
ed << "<" << newValue << "> is not a valid shell command. Command ignored.";
|
||||
@@ -503,9 +503,9 @@ void G4UIcontrolMessenger::SetNewValue(G4UIcommand* command, G4String newValue)
|
||||
if (command == ifCommand) {
|
||||
G4Tokenizer next(newValue);
|
||||
G4double l = StoD(next());
|
||||
G4String comp = next();
|
||||
const G4String& comp = next();
|
||||
G4double r = StoD(next());
|
||||
G4String mac = next();
|
||||
const G4String& mac = next();
|
||||
G4bool x = false;
|
||||
if (comp == ">") {
|
||||
x = (l > r);
|
||||
@@ -532,7 +532,7 @@ void G4UIcontrolMessenger::SetNewValue(G4UIcommand* command, G4String newValue)
|
||||
if (command == doifCommand) {
|
||||
G4Tokenizer next(newValue);
|
||||
G4double l = StoD(next());
|
||||
G4String comp = next();
|
||||
const G4String& comp = next();
|
||||
G4double r = StoD(next());
|
||||
|
||||
G4String c1 = next();
|
||||
@@ -549,7 +549,7 @@ void G4UIcontrolMessenger::SetNewValue(G4UIcommand* command, G4String newValue)
|
||||
else {
|
||||
strippedValue = c1.substr(1, c1.length() - 1);
|
||||
}
|
||||
c1 = strippedValue;
|
||||
c1 = std::move(strippedValue);
|
||||
}
|
||||
|
||||
G4bool x = false;
|
||||
@@ -577,7 +577,7 @@ void G4UIcontrolMessenger::SetNewValue(G4UIcommand* command, G4String newValue)
|
||||
}
|
||||
if (command == addCommand) {
|
||||
G4Tokenizer next(newValue);
|
||||
G4String newA = next();
|
||||
const G4String& newA = next();
|
||||
G4double l = StoD(next());
|
||||
G4double r = StoD(next());
|
||||
G4String st = "/control/alias ";
|
||||
@@ -588,7 +588,7 @@ void G4UIcontrolMessenger::SetNewValue(G4UIcommand* command, G4String newValue)
|
||||
}
|
||||
if (command == subtractCommand) {
|
||||
G4Tokenizer next(newValue);
|
||||
G4String newA = next();
|
||||
const G4String& newA = next();
|
||||
G4double l = StoD(next());
|
||||
G4double r = StoD(next());
|
||||
G4String st = "/control/alias ";
|
||||
@@ -599,7 +599,7 @@ void G4UIcontrolMessenger::SetNewValue(G4UIcommand* command, G4String newValue)
|
||||
}
|
||||
if (command == multiplyCommand) {
|
||||
G4Tokenizer next(newValue);
|
||||
G4String newA = next();
|
||||
const G4String& newA = next();
|
||||
G4double l = StoD(next());
|
||||
G4double r = StoD(next());
|
||||
G4String st = "/control/alias ";
|
||||
@@ -610,7 +610,7 @@ void G4UIcontrolMessenger::SetNewValue(G4UIcommand* command, G4String newValue)
|
||||
}
|
||||
if (command == divideCommand) {
|
||||
G4Tokenizer next(newValue);
|
||||
G4String newA = next();
|
||||
const G4String& newA = next();
|
||||
G4double l = StoD(next());
|
||||
G4double r = StoD(next());
|
||||
G4String st = "/control/alias ";
|
||||
@@ -621,7 +621,7 @@ void G4UIcontrolMessenger::SetNewValue(G4UIcommand* command, G4String newValue)
|
||||
}
|
||||
if (command == remainderCommand) {
|
||||
G4Tokenizer next(newValue);
|
||||
G4String newA = next();
|
||||
const G4String& newA = next();
|
||||
G4int l = StoI(next());
|
||||
G4int r = StoI(next());
|
||||
G4String st = "/control/alias ";
|
||||
@@ -632,10 +632,10 @@ void G4UIcontrolMessenger::SetNewValue(G4UIcommand* command, G4String newValue)
|
||||
}
|
||||
if (command == strifCommand) {
|
||||
G4Tokenizer next(newValue);
|
||||
G4String l = next();
|
||||
G4String comp = next();
|
||||
G4String r = next();
|
||||
G4String mac = next();
|
||||
const G4String& l = next();
|
||||
const G4String& comp = next();
|
||||
const G4String& r = next();
|
||||
const G4String& mac = next();
|
||||
G4bool x = false;
|
||||
if (comp == "==") {
|
||||
x = (l == r);
|
||||
@@ -649,9 +649,9 @@ void G4UIcontrolMessenger::SetNewValue(G4UIcommand* command, G4String newValue)
|
||||
}
|
||||
if (command == strdoifCommand) {
|
||||
G4Tokenizer next(newValue);
|
||||
G4String l = next();
|
||||
G4String comp = next();
|
||||
G4String r = next();
|
||||
const G4String& l = next();
|
||||
const G4String& comp = next();
|
||||
const G4String& r = next();
|
||||
|
||||
G4String c1 = next();
|
||||
G4String ca;
|
||||
@@ -667,7 +667,7 @@ void G4UIcontrolMessenger::SetNewValue(G4UIcommand* command, G4String newValue)
|
||||
else {
|
||||
strippedValue = c1.substr(1, c1.length() - 1);
|
||||
}
|
||||
c1 = strippedValue;
|
||||
c1 = std::move(strippedValue);
|
||||
}
|
||||
|
||||
G4bool x = false;
|
||||
|
||||
Reference in New Issue
Block a user