Skip to content

Commit

Permalink
Requests: Fix min/max to be used from limits
Browse files Browse the repository at this point in the history
Updated the code to use min/max from limits to avoid potential
compilation Issues on WOA devices.
  • Loading branch information
thirumalai-qcom committed Jul 26, 2024
1 parent 7e3f2a8 commit 1735602
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/requesthandler/RequestHandler_SceneItems.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ RequestResult RequestHandler::SetSceneItemTransform(const Request &request)
}

if (r.Contains("alignment")) {
if (!r.ValidateOptionalNumber("alignment", statusCode, comment, 0, std::numeric_limits<uint32_t>::max()))
if (!r.ValidateOptionalNumber("alignment", statusCode, comment, 0, (std::numeric_limits<uint32_t>::max)()))
return RequestResult::Error(statusCode, comment);
sceneItemTransform.alignment = r.RequestData["alignment"];
transformChanged = true;
Expand All @@ -458,7 +458,7 @@ RequestResult RequestHandler::SetSceneItemTransform(const Request &request)
}

if (r.Contains("boundsAlignment")) {
if (!r.ValidateOptionalNumber("boundsAlignment", statusCode, comment, 0, std::numeric_limits<uint32_t>::max()))
if (!r.ValidateOptionalNumber("boundsAlignment", statusCode, comment, 0, (std::numeric_limits<uint32_t>::max)()))
return RequestResult::Error(statusCode, comment);
sceneItemTransform.bounds_alignment = r.RequestData["boundsAlignment"];
transformChanged = true;
Expand Down

0 comments on commit 1735602

Please sign in to comment.