Skip to content

Commit d153910

Browse files
committed
3.04.00 release
1 parent 0788b8c commit d153910

37 files changed

+2805
-68
lines changed

.appveyor.yml

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
version: 1.0.{build}
2-
3-
platform:
4-
- MSVC_2013_x86
5-
- MSVC_2013_x64
6-
- MSVC_2015_x86
7-
- MSVC_2015_x64
8-
- MinGW_x86
9-
- MinGW_x64
10-
11-
install:
12-
- scripts\ci-pre.cmd
13-
14-
build_script:
15-
- scripts\ci-build.cmd
16-
17-
test_script:
18-
- scripts\ci-test.cmd
1+
version: 1.0.{build}
2+
3+
platform:
4+
- MSVC_2013_x86
5+
- MSVC_2013_x64
6+
- MSVC_2015_x86
7+
- MSVC_2015_x64
8+
- MinGW_x86
9+
- MinGW_x64
10+
11+
install:
12+
- scripts\ci-pre.cmd
13+
14+
build_script:
15+
- scripts\ci-build.cmd
16+
17+
test_script:
18+
- scripts\ci-test.cmd

.clang-format

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ DerivePointerBinding : false
2121
IndentWidth : 4
2222
KeepEmptyLinesAtTheStartOfBlocks : true
2323
MaxEmptyLinesToKeep : 2
24-
NamespaceIndentation : Inner
24+
NamespaceIndentation : All
2525
PointerBindsToType : true
2626
SpacesBeforeTrailingComments : 1
2727
SpacesInAngles : false

.gitignore

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ tags
44
.swp
55
*.swp
66
.swo
7+
.TMP
78
-.d
89
eastl_build_out
910
build_bench
@@ -23,8 +24,6 @@ cmake_install.cmake
2324
**/*.vcxproj.filters
2425
*.VC.opendb
2526
*.sdf
26-
**/*.suo
27-
**/*.user
2827
.vs/*
2928
**/Debug/*
3029
CMakeFiles/*
@@ -34,5 +33,6 @@ Release/*
3433
Win32/*
3534
x64/*
3635
MinSizeRel/*
37-
build*/*
36+
build/*
3837
Testing/*
38+
%ALLUSERSPROFILE%/*

.p4ignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
/.git/
22
tags
3+
.gitignore

include/EASTL/algorithm.h

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4146,6 +4146,27 @@ namespace eastl
41464146

41474147

41484148

4149+
/// clamp
4150+
///
4151+
/// Returns a reference to a clamped value within the range of [lo, hi].
4152+
///
4153+
/// http://en.cppreference.com/w/cpp/algorithm/clamp
4154+
///
4155+
template <class T>
4156+
EA_CONSTEXPR const T& clamp(const T& v, const T& lo, const T& hi)
4157+
{
4158+
return clamp(v, lo, hi, eastl::less<>());
4159+
}
4160+
4161+
template <class T, class Compare>
4162+
EA_CONSTEXPR const T& clamp(const T& v, const T& lo, const T& hi, Compare comp)
4163+
{
4164+
// code collapsed to a single line due to constexpr requirements
4165+
return [&] { EASTL_ASSERT(!comp(hi, lo)); }(),
4166+
comp(v, lo) ? lo : comp(hi, v) ? hi : v;
4167+
}
4168+
4169+
41494170
} // namespace eastl
41504171

41514172

0 commit comments

Comments
 (0)