[C++][Pistache] Rename value holder to lower chance of collision with parameter name (#4948)

* [C++][Pistache] Rename value holder to lower chance of collision with parameter name

* [C++][Pistache] Update Petstore sample
This commit is contained in:
Mateusz Szychowski (Muttley)
2020-01-21 00:47:26 +01:00
committed by sunn
parent 2bc3c196e8
commit 6af27d52ca
4 changed files with 16 additions and 16 deletions

View File

@@ -91,9 +91,9 @@ void PetApi::find_pets_by_status_handler(const Pistache::Rest::Request &request,
auto statusQuery = request.query().get("status");
Pistache::Optional<std::vector<std::string>> status;
if(!statusQuery.isEmpty()){
std::vector<std::string> value;
if(fromStringValue(statusQuery.get(), value)){
status = Pistache::Some(value);
std::vector<std::string> valueQuery_instance;
if(fromStringValue(statusQuery.get(), valueQuery_instance)){
status = Pistache::Some(valueQuery_instance);
}
}
@@ -116,9 +116,9 @@ void PetApi::find_pets_by_tags_handler(const Pistache::Rest::Request &request, P
auto tagsQuery = request.query().get("tags");
Pistache::Optional<std::vector<std::string>> tags;
if(!tagsQuery.isEmpty()){
std::vector<std::string> value;
if(fromStringValue(tagsQuery.get(), value)){
tags = Pistache::Some(value);
std::vector<std::string> valueQuery_instance;
if(fromStringValue(tagsQuery.get(), valueQuery_instance)){
tags = Pistache::Some(valueQuery_instance);
}
}