Skip to content

Commit

Permalink
libpisp: pisp_utils: Use 'abs()' from STL
Browse files Browse the repository at this point in the history
The 'abs()' symbol is undefined. Use the implementation from the
C++ STL.

Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
  • Loading branch information
Jacopo Mondi authored and naushir committed Jul 8, 2024
1 parent 838c00b commit 73ee880
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/libpisp/common/pisp_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
*
* pisp_utils.cpp - PiSP buffer helper utilities
*/
#include <cmath>
#include <cstdint>

#include "backend/pisp_be_config.h"
Expand Down Expand Up @@ -181,7 +182,7 @@ int num_planes(pisp_image_format format)

std::size_t get_plane_size(const pisp_image_format_config &config, int plane)
{
uint64_t stride = abs(plane ? config.stride2 : config.stride); // in case vflipped?
uint64_t stride = std::abs(plane ? config.stride2 : config.stride); // in case vflipped?
uint64_t plane_size = 0;

if (PISP_IMAGE_FORMAT_WALLPAPER(config.format))
Expand Down

0 comments on commit 73ee880

Please sign in to comment.