Skip to content

Commit

Permalink
avoid shadowed declaration
Browse files Browse the repository at this point in the history
  • Loading branch information
kosloot committed May 2, 2024
1 parent 73fd00c commit b94cfea
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/TcpServer.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -136,23 +136,23 @@ void TcpServer::callback( childArgs *args ){
string Line;
int sockId = args->id();
TimblThread *client = 0;
map<string, TimblExperiment*> experiments =
map<string, TimblExperiment*> my_experiments =
*(static_cast<const map<string, TimblExperiment*> *>(callback_data()));

int result = 0;
args->os() << "Welcome to the Timbl server." << endl;
if ( experiments.size() == 1
&& experiments.find("default") != experiments.end() ){
if ( my_experiments.size() == 1
&& my_experiments.find("default") != my_experiments.end() ){
DBG << " Voor Create Default Client " << endl;
TimblExperiment *exp = experiments["default"];
TimblExperiment *exp = my_experiments["default"];
client = new TimblThread( exp, args );
DBG << " Na Create Client " << endl;
// report connection to the server terminal
//
}
else {
args->os() << "available bases: ";
for ( const auto& exp_it : experiments ){
for ( const auto& exp_it : my_experiments ){
args->os() << exp_it.first << " ";
}
args->os() << endl;
Expand All @@ -171,8 +171,8 @@ void TcpServer::callback( childArgs *args ){
DBG << "TcpServer::Param='" << Param << "'" << endl;
switch ( check_command(Command) ){
case Base:{
auto exp_it = experiments.find(Param);
if ( exp_it != experiments.end() ){
auto exp_it = my_experiments.find(Param);
if ( exp_it != my_experiments.end() ){
args->os() << "selected base: '" << Param << "'" << endl;
if ( client ){
delete client;
Expand Down

0 comments on commit b94cfea

Please sign in to comment.