use empty() instead of comparison with an empty string

This commit is contained in:
Ingo Weyrich
2019-07-22 13:49:08 +02:00
parent fd6453d1a8
commit cbb3f05b7e
25 changed files with 85 additions and 356 deletions

View File

@@ -504,7 +504,7 @@ void ICMPanel::read(const ProcParams* pp, const ParamsEdited* pedited)
if (pp->icm.inputProfile == "(none)") {
inone->set_active(true);
updateDCP(pp->icm.dcpIlluminant, "");
} else if (pp->icm.inputProfile == "(embedded)" || ((pp->icm.inputProfile == "(camera)" || pp->icm.inputProfile == "") && icamera->get_state() == Gtk::STATE_INSENSITIVE)) {
} else if (pp->icm.inputProfile == "(embedded)" || ((pp->icm.inputProfile == "(camera)" || pp->icm.inputProfile.empty()) && icamera->get_state() == Gtk::STATE_INSENSITIVE)) {
iembedded->set_active(true);
updateDCP(pp->icm.dcpIlluminant, "");
} else if ((pp->icm.inputProfile == "(cameraICC)") && icameraICC->get_state() != Gtk::STATE_INSENSITIVE) {
@@ -519,7 +519,7 @@ void ICMPanel::read(const ProcParams* pp, const ParamsEdited* pedited)
// If neither (camera) nor (cameraICC) are available, as is the case when loading a non-raw, activate (embedded).
iembedded->set_active(true);
updateDCP(pp->icm.dcpIlluminant, "(cameraICC)");
} else if ((pp->icm.inputProfile == "(camera)" || pp->icm.inputProfile == "") && icamera->get_state() != Gtk::STATE_INSENSITIVE) {
} else if ((pp->icm.inputProfile == "(camera)" || pp->icm.inputProfile.empty()) && icamera->get_state() != Gtk::STATE_INSENSITIVE) {
icamera->set_active(true);
updateDCP(pp->icm.dcpIlluminant, "");
} else {
@@ -949,7 +949,7 @@ void ICMPanel::setRawMeta(bool raw, const rtengine::FramesData* pMeta)
void ICMPanel::ipSelectionChanged()
{
if (ipDialog->get_filename() == "") {
if (ipDialog->get_filename().empty()) {
return;
}