@@ -68,19 +68,21 @@ void Get_wf_lcao::begin(const UnitCell& ucell,
6868 ModuleBase::GlobalFunc::OUT (GlobalV::ofs_running, " On-the-fly memory consumption (MB)" , mem_size);
6969
7070 int mode_norm = 0 ;
71- if (nbands_istate > 0 && static_cast <int >(out_wfc_norm.size ()) == 0 )
71+ const int norm_size = static_cast <int >(out_wfc_norm.size ();
72+
73+ if (nbands_istate > 0 && norm_size) == 0 )
7274 {
7375 mode_norm = 1 ;
7476 }
75- else if (static_cast < int >(out_wfc_norm. size ()) > 0 )
77+ else if (norm_size > 0 )
7678 {
7779 // If out_wfc_norm is not empty, set mode to 2
7880 mode_norm = 2 ;
7981 std::cout << " Notice: INPUT parameter `nbands_istate` overwritten by `out_wfc_norm`!" << std::endl;
8082 }
8183
8284 // Set this->bands_picked_ according to the mode
83- select_bands (nbands_istate, out_wfc_norm, nbands, nelec, mode_norm, fermi_band);
85+ this -> select_bands (nbands_istate, out_wfc_norm, nbands, nelec, mode_norm, fermi_band);
8486
8587 // Calculate out_wfc_norm
8688 for (int ib = 0 ; ib < nbands; ++ib)
@@ -153,7 +155,7 @@ void Get_wf_lcao::begin(const UnitCell& ucell,
153155 }
154156
155157 // Set this->bands_picked_ according to the mode
156- select_bands (nbands_istate, out_wfc_re_im, nbands, nelec, mode_re_im, fermi_band);
158+ this -> select_bands (nbands_istate, out_wfc_re_im, nbands, nelec, mode_re_im, fermi_band);
157159
158160 if (out_wfc_pw || out_wfc_r)
159161 {
@@ -325,7 +327,7 @@ void Get_wf_lcao::begin(const UnitCell& ucell,
325327 }
326328
327329 // Set this->bands_picked_ according to the mode
328- select_bands (nbands_istate, out_wfc_norm, nbands, nelec, mode_norm, fermi_band);
330+ this -> select_bands (nbands_istate, out_wfc_norm, nbands, nelec, mode_norm, fermi_band);
329331
330332 // Calculate out_wfc_norm
331333 for (int ib = 0 ; ib < nbands; ++ib)
0 commit comments