Skip to content

Commit

Permalink
#2830 USe empty() instead of lebgth checking
Browse files Browse the repository at this point in the history
  • Loading branch information
Howard Soh committed Apr 5, 2024
1 parent 2bd5dcf commit 1f32746
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/tools/other/gen_vx_mask/gen_vx_mask.cc
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ void process_mask_file(DataPlane &dp) {
// For solar masking, parse the valid time from gridded data
if(is_solar_masktype(mask_type) && solar_ut == (unixtime) 0) {

if(mask_field_str.length() == 0) {
if(mask_field_str.empty()) {
mlog << Error << "\nprocess_mask_file() -> "
<< "use \"-mask_field\" to specify the data whose valid "
<< "time should be used for \"solar_alt\" and "
Expand All @@ -349,7 +349,7 @@ void process_mask_file(DataPlane &dp) {
}

// Check that mask_field has been set for data masking
if(mask_type == MaskType::Data && mask_field_str.length() == 0) {
if(mask_type == MaskType::Data && mask_field_str.empty()) {
mlog << Error << "\nprocess_mask_file() -> "
<< "use \"-mask_field\" to specify the field for "
<< "\"data\" masking.\n\n";
Expand Down

0 comments on commit 1f32746

Please sign in to comment.