Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2094)

Unified Diff: src/IceUtils.h

Issue 1341423002: Reflow comments to use the full width. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Fix spelling and rebase Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/IceTypes.def ('k') | src/PNaClTranslator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceUtils.h
diff --git a/src/IceUtils.h b/src/IceUtils.h
index f07a566b1c7954636d21f849a7e060b1b8efca9c..9387671fa21b5a54e6cf9d5b654dbd1b6b0fd89a 100644
--- a/src/IceUtils.h
+++ b/src/IceUtils.h
@@ -19,11 +19,10 @@
namespace Ice {
-/// Similar to bit_cast, but allows copying from types of unrelated
-/// sizes. This method was introduced to enable the strict aliasing
-/// optimizations of GCC 4.4. Basically, GCC mindlessly relies on
-/// obscure details in the C++ standard that make reinterpret_cast
-/// virtually useless.
+/// Similar to bit_cast, but allows copying from types of unrelated sizes. This
+/// method was introduced to enable the strict aliasing optimizations of GCC
+/// 4.4. Basically, GCC mindlessly relies on obscure details in the C++ standard
+/// that make reinterpret_cast virtually useless.
template <class D, class S> inline D bit_copy(const S &source) {
D destination;
// This use of memcpy is safe: source and destination cannot overlap.
@@ -63,8 +62,8 @@ public:
return IsUint(N, Value);
}
- /// Return true if the addition X + Y will cause integer overflow for
- /// integers of type T.
+ /// Return true if the addition X + Y will cause integer overflow for integers
+ /// of type T.
template <typename T> static inline bool WouldOverflowAdd(T X, T Y) {
return ((X > 0 && Y > 0 && (X > std::numeric_limits<T>::max() - Y)) ||
(X < 0 && Y < 0 && (X < std::numeric_limits<T>::min() - Y)));
« no previous file with comments | « src/IceTypes.def ('k') | src/PNaClTranslator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698