mirror of
https://github.com/textmate/textmate.git
synced 2026-04-28 03:00:34 -04:00
Use std::abs instead of abs()
This suppresses a couple of warnings with the latest version of clang shipped with Xcode 6.3.
This commit is contained in:
committed by
Allan Odgaard
parent
172ce9d428
commit
4aff7098a5
@@ -94,7 +94,7 @@ NSUInteger const OakMoveNoActionReturn = 3;
|
||||
|
||||
NSInteger row = [_tableView selectedRow] + anOffset;
|
||||
NSInteger numberOfRows = [_tableView numberOfRows];
|
||||
if(abs(anOffset) == 1 && numberOfRows && [[NSUserDefaults standardUserDefaults] boolForKey:kUserDefaultsEnableLoopFilterList])
|
||||
if(std::abs(anOffset) == 1 && numberOfRows && [[NSUserDefaults standardUserDefaults] boolForKey:kUserDefaultsEnableLoopFilterList])
|
||||
row = (row + numberOfRows) % numberOfRows;
|
||||
else row = oak::cap((NSInteger)0, row, numberOfRows - 1);
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ void test_date_value ()
|
||||
{
|
||||
oak::date_t now = oak::date_t::now();
|
||||
oak::date_t stillNow(now.time_value());
|
||||
OAK_ASSERT_LT(abs(now.value() - stillNow.value()), 0.5);
|
||||
OAK_ASSERT_LT(std::abs(now.value() - stillNow.value()), 0.5);
|
||||
}
|
||||
|
||||
void test_date_time_value ()
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
#include "prelude-mac.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <cmath>
|
||||
#include <deque>
|
||||
#include <functional>
|
||||
#include <iterator>
|
||||
|
||||
Reference in New Issue
Block a user