refactor: use auto for iterator types
Replace explicit iterator types with auto for better readability. Co-authored-by: CommandCodeBot <noreply@commandcode.ai>
This commit is contained in:
1 parent
79bbd0677d
commit
4ee402abff
8 files changed
+25
-25
No files matched your search
@@ -277,7 +277,7 @@ void Behandlungsfall::erzeugeBehandlungstage()
|
||||
{
|
||||
std::map<std::string, std::vector<Tag*>, DateCmp > datum2Tage;
|
||||
std::for_each(ALL(scheine_), InsertTage(datum2Tage));
|
||||
for(std::map<std::string, std::vector<Tag*>, DateCmp >::iterator iter = datum2Tage.begin(), i_end = datum2Tage.end(); iter != i_end; ++iter) {
|
||||
for(auto iter = datum2Tage.begin(), i_end = datum2Tage.end(); iter != i_end; ++iter) {
|
||||
bhds_.push_back(new(memAllokator_) BehandlungZeitraumDatum(iter->second, memAllokator_));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -372,8 +372,8 @@ namespace rw {
|
||||
|
||||
void Patientenfall::aktualisiereKHFData()
|
||||
{
|
||||
//using boost::lambda::bind;
|
||||
//using boost::lambda::_1;
|
||||
|
||||
|
||||
if(!KONFIG::khfRegelnDefiniert())
|
||||
return ;
|
||||
|
||||
|
||||
@@ -49,8 +49,8 @@ Menge* SysTag::gops() const
|
||||
Menge* SysTag::gops(const string& taetigkeit)
|
||||
{
|
||||
taetigkeit_gops_->clear();
|
||||
std::vector<Leistung*>::iterator i_end = leistungVector_.end();
|
||||
std::vector<Leistung*>::iterator iter = find_if(leistungVector_.begin(), i_end, Taetigkeit_Praedikat(taetigkeit));
|
||||
auto i_end = leistungVector_.end();
|
||||
auto iter = find_if(leistungVector_.begin(), i_end, Taetigkeit_Praedikat(taetigkeit));
|
||||
while(iter != i_end) {
|
||||
taetigkeit_gops_->addElement((*iter)->gop());
|
||||
iter = find_if(iter+1, i_end, Taetigkeit_Praedikat(taetigkeit));
|
||||
@@ -61,8 +61,8 @@ Menge* SysTag::gops(const string& taetigkeit)
|
||||
Menge* SysTag::gops(const Menge* taetigkeitenm)
|
||||
{
|
||||
taetigkeit_gops_->clear();
|
||||
std::vector<Leistung*>::iterator i_end = leistungVector_.end();
|
||||
std::vector<Leistung*>::iterator iter = find_if(leistungVector_.begin(), i_end, Taetigkeitenm_Oder_Leer_Praedikat(taetigkeitenm));
|
||||
auto i_end = leistungVector_.end();
|
||||
auto iter = find_if(leistungVector_.begin(), i_end, Taetigkeitenm_Oder_Leer_Praedikat(taetigkeitenm));
|
||||
while(iter != i_end) {
|
||||
taetigkeit_gops_->addElement((*iter)->gop());
|
||||
iter = find_if(iter+1, i_end, Taetigkeitenm_Oder_Leer_Praedikat(taetigkeitenm));
|
||||
|
||||
@@ -643,9 +643,9 @@ bool AddAlwaysGOPMengeDirect( const Menge* gm, Leistung& lst, const TaetigkeitOr
|
||||
{
|
||||
leistungenimscope( 0, true ); // Alle Leistungen (auch gelöschte)
|
||||
|
||||
const std::vector<Leistung*>::iterator i_begin = sProdLeistungArray.begin();
|
||||
const std::vector<Leistung*>::iterator i_end = sProdLeistungArray.end();
|
||||
std::vector<Leistung*>::iterator iter = find( i_begin, i_end, &lst );
|
||||
const auto i_begin = sProdLeistungArray.begin();
|
||||
const auto i_end = sProdLeistungArray.end();
|
||||
auto iter = find( i_begin, i_end, &lst );
|
||||
|
||||
if ( iter == i_end ) {
|
||||
return false;
|
||||
@@ -678,9 +678,9 @@ bool AddAlwaysGOPMenge(const Menge* gm, Leistung& lst)
|
||||
bool AddAlwaysGOPMenge(const Menge* gm, Leistung& lst, const TaetigkeitOrt& taetigkeitOrt, const Menge* feldkm)
|
||||
{
|
||||
leistungenimscope(0, true); // Alle Leistungen auch geloeschte!
|
||||
std::vector<Leistung*>::iterator i_begin = sProdLeistungArray.begin();
|
||||
std::vector<Leistung*>::iterator i_end = sProdLeistungArray.end();
|
||||
std::vector<Leistung*>::iterator iter = find(i_begin, i_end, &lst);
|
||||
auto i_begin = sProdLeistungArray.begin();
|
||||
auto i_end = sProdLeistungArray.end();
|
||||
auto iter = find(i_begin, i_end, &lst);
|
||||
if(iter == i_end)
|
||||
return false;
|
||||
|
||||
@@ -2625,7 +2625,7 @@ IRWLeistung* ersterAnsatz(const char* taetigkeit, const Menge* gm)
|
||||
leistungenimscope(const_cast<Menge*>(gm));
|
||||
stable_sort(sLeistungArray.begin(), sLeistungArray.end()-1, SortLeistungNachBHD());
|
||||
|
||||
std::vector<IRWLeistung*>::iterator iter = find_if(sLeistungArray.begin(), sLeistungArray.end(), Taetigkeit_Compare_Class(taetigkeit));
|
||||
auto iter = find_if(sLeistungArray.begin(), sLeistungArray.end(), Taetigkeit_Compare_Class(taetigkeit));
|
||||
if(iter != sLeistungArray.end())
|
||||
return *iter;
|
||||
else
|
||||
|
||||
@@ -72,14 +72,14 @@ public:
|
||||
|
||||
if(op_leistungen->leistungen().size() == 0)
|
||||
return false;
|
||||
std::vector<IRWLeistung*>::iterator i_end(op_leistungen->leistungen().end());
|
||||
std::vector<IRWLeistung*>::iterator iter =
|
||||
auto i_end(op_leistungen->leistungen().end());
|
||||
auto iter =
|
||||
std::min_element(op_leistungen->leistungen().begin(), i_end, KleinerOPDatum());
|
||||
op_datum = (*iter)->opDatum();
|
||||
}
|
||||
else {
|
||||
std::vector<IRWLeistung*>::iterator i_end(gm4_leistungen.leistungen().end());
|
||||
std::vector<IRWLeistung*>::iterator iter =
|
||||
auto i_end(gm4_leistungen.leistungen().end());
|
||||
auto iter =
|
||||
std::min_element(gm4_leistungen.leistungen().begin(), i_end, SortLeistungNachBHD());
|
||||
op_datum = (*iter)->datum();
|
||||
}
|
||||
|
||||
@@ -72,14 +72,14 @@ public:
|
||||
string op_datum;
|
||||
std::unique_ptr<SysLeistungen> op_leistungen(&gm4_leistungen.match(HatOPDatum()));
|
||||
if(pruefe_opdatum_ == NUM_YES && op_leistungen->leistungen().size() != 0) {
|
||||
std::vector<IRWLeistung*>::iterator i_end(op_leistungen->leistungen().end());
|
||||
std::vector<IRWLeistung*>::iterator iter =
|
||||
auto i_end(op_leistungen->leistungen().end());
|
||||
auto iter =
|
||||
std::min_element(op_leistungen->leistungen().begin(), i_end, KleinerOPDatum());
|
||||
op_datum = (*iter)->opDatum();
|
||||
}
|
||||
else {
|
||||
std::vector<IRWLeistung*>::iterator i_end(gm4_leistungen.leistungen().end());
|
||||
std::vector<IRWLeistung*>::iterator iter =
|
||||
auto i_end(gm4_leistungen.leistungen().end());
|
||||
auto iter =
|
||||
std::min_element(gm4_leistungen.leistungen().begin(), i_end, SortLeistungNachBHD());
|
||||
op_datum = (*iter)->datum();
|
||||
}
|
||||
|
||||
@@ -73,8 +73,8 @@ Menge* gopBereich2GOPMenge(const char* vonGOP, const char* bisGOP)
|
||||
bisgop = "99999Z";
|
||||
|
||||
initAlleGops();
|
||||
std::vector<string>::iterator i_begin(sVecAlleGops.begin());
|
||||
std::vector<string>::iterator i_end(sVecAlleGops.end());
|
||||
auto i_begin(sVecAlleGops.begin());
|
||||
auto i_end(sVecAlleGops.end());
|
||||
auto iter = lower_bound(i_begin, i_end, string(vongop), SortGOPClass());
|
||||
while(iter != i_end && gopKleinerGleichGop(iter->c_str(), bisgop.c_str())) {
|
||||
if(gopImBereich(iter->c_str(), vongop.c_str(), bisgop.c_str())) {
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
//#include "boost/noncopyable.hpp"
|
||||
|
||||
|
||||
|
||||
#include <zlib.h>
|
||||
|
||||
Reference in new issue
Block a user