Skip to content

Commit

Permalink
3.04.00 release
Browse files Browse the repository at this point in the history
  • Loading branch information
rparolin committed Oct 26, 2016
1 parent 0788b8c commit d153910
Show file tree
Hide file tree
Showing 37 changed files with 2,805 additions and 68 deletions.
36 changes: 18 additions & 18 deletions .appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
version: 1.0.{build}

platform:
- MSVC_2013_x86
- MSVC_2013_x64
- MSVC_2015_x86
- MSVC_2015_x64
- MinGW_x86
- MinGW_x64

install:
- scripts\ci-pre.cmd

build_script:
- scripts\ci-build.cmd

test_script:
- scripts\ci-test.cmd
version: 1.0.{build}

platform:
- MSVC_2013_x86
- MSVC_2013_x64
- MSVC_2015_x86
- MSVC_2015_x64
- MinGW_x86
- MinGW_x64

install:
- scripts\ci-pre.cmd

build_script:
- scripts\ci-build.cmd

test_script:
- scripts\ci-test.cmd
2 changes: 1 addition & 1 deletion .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ DerivePointerBinding : false
IndentWidth : 4
KeepEmptyLinesAtTheStartOfBlocks : true
MaxEmptyLinesToKeep : 2
NamespaceIndentation : Inner
NamespaceIndentation : All
PointerBindsToType : true
SpacesBeforeTrailingComments : 1
SpacesInAngles : false
Expand Down
6 changes: 3 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ tags
.swp
*.swp
.swo
.TMP
-.d
eastl_build_out
build_bench
Expand All @@ -23,8 +24,6 @@ cmake_install.cmake
**/*.vcxproj.filters
*.VC.opendb
*.sdf
**/*.suo
**/*.user
.vs/*
**/Debug/*
CMakeFiles/*
Expand All @@ -34,5 +33,6 @@ Release/*
Win32/*
x64/*
MinSizeRel/*
build*/*
build/*
Testing/*
%ALLUSERSPROFILE%/*
1 change: 1 addition & 0 deletions .p4ignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
/.git/
tags
.gitignore
21 changes: 21 additions & 0 deletions include/EASTL/algorithm.h
Original file line number Diff line number Diff line change
Expand Up @@ -4146,6 +4146,27 @@ namespace eastl



/// clamp
///
/// Returns a reference to a clamped value within the range of [lo, hi].
///
/// http://en.cppreference.com/w/cpp/algorithm/clamp
///
template <class T>
EA_CONSTEXPR const T& clamp(const T& v, const T& lo, const T& hi)
{
return clamp(v, lo, hi, eastl::less<>());
}

template <class T, class Compare>
EA_CONSTEXPR const T& clamp(const T& v, const T& lo, const T& hi, Compare comp)
{
// code collapsed to a single line due to constexpr requirements
return [&] { EASTL_ASSERT(!comp(hi, lo)); }(),
comp(v, lo) ? lo : comp(hi, v) ? hi : v;
}


} // namespace eastl


Expand Down
Loading

0 comments on commit d153910

Please sign in to comment.