mirror of
https://github.com/Palakis/obs-websocket.git
synced 2024-08-30 18:12:16 +00:00
Requests: Fix min/max to be used from limits
Updated the code to use min/max from limits to avoid potential compilation Issues on WOA devices.
This commit is contained in:
parent
7e3f2a82f0
commit
17356024a2
@ -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;
|
||||
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user