From 53cd5e1fbc3d3ee02397ed0d78542b92dee6a853 Mon Sep 17 00:00:00 2001 From: cremno Date: Sun, 31 Aug 2014 11:10:57 +0200 Subject: [PATCH] use std::max instead of ?: --- binding-mri/table-binding.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/binding-mri/table-binding.cpp b/binding-mri/table-binding.cpp index 8a8d724..87a9b58 100644 --- a/binding-mri/table-binding.cpp +++ b/binding-mri/table-binding.cpp @@ -19,6 +19,7 @@ ** along with mkxp. If not, see . */ +#include #include "table.h" #include "binding-util.h" #include "serializable-binding.h" @@ -26,7 +27,7 @@ static int num2TableSize(VALUE v) { int i = NUM2INT(v); - return i >= 0 ? i : 0; + return std::max(0, i); } static void parseArgsTableSizes(int argc, VALUE *argv, int *x, int *y, int *z)