Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / native_client / src / include / checked_cast.h
index 143edea..53a856a 100644 (file)
@@ -1,7 +1,7 @@
 /*
- * Copyright 2010 The Native Client Authors.  All rights reserved.
- * Use of this source code is governed by a BSD-style license that can
- * be found in the LICENSE file.
+ * Copyright 2010 The Native Client Authors. All rights reserved.
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
  */
 
 //
 #define NATIVE_CLIENT_SRC_INCLUDE_CHECKED_CAST_H_ 1
 
 // Windows defines std::min and std::max in a different header
-// than gcc.
+// than gcc prior to Visual Studio 2013.
 #if NACL_WINDOWS
 #include <xutility>
 #endif
 
-#include <limits>
-
-#if !NACL_WINDOWS
-// this is where std::min/max SHOULD live. It's included here (rather than
-// in an else block along with the Windows include above) to avoid breaking
-// google cpplint's header file inclusion order rules.
 #include <algorithm>
-#endif
+#include <limits>
 
 // TODO(ilewis): remove reference to base as soon as we can get COMPILE_ASSERT
 //                from another source.
@@ -352,8 +346,6 @@ template <
     typename source_t,
     template<typename, typename> class trunc_policy>
 target_t nacl::checked_cast(const source_t& input) {
-  typedef CheckedCast::detail::CastInfo<target_t, source_t> info;
-
   target_t output;
 
   //