From 48f7363cd7b87c3effd7e4a67a8ee5f8b943c562 Mon Sep 17 00:00:00 2001 From: Beman Date: Wed, 31 Dec 2014 10:15:47 -0500 Subject: [PATCH] Minor wording refinements. --- doc/index.html | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/doc/index.html b/doc/index.html index d5a0f74..114c635 100644 --- a/doc/index.html +++ b/doc/index.html @@ -188,7 +188,7 @@ and arithmetic types

The best approach to endianness for a particular application depends on the interaction between the application's needs and the characteristics of each of the three (conversion -functions, buffer types, or arithmetic types) approaches.

+functions, buffer types, and arithmetic types) approaches.

Recommendation: If you are new to endianness, uncertain, or don't want to invest the time to @@ -212,8 +212,7 @@ alignment requirements.

Endian conversion functions use objects of the ordinary C++ arithmetic types like int or unsigned short to hold values. That breaks the implicit invariant that the C++ language rules apply. The usual -language rules only apply if the endianness of the object is currently set by -the conversion functions to the native endianness for the platform. That can +language rules only apply if the endianness of the object is currently set to the native endianness for the platform. That can make it very hard to reason about complex logic flow, and result in difficult to find bugs.

@@ -328,15 +327,16 @@ conversion from native to the desired output endianness.

This pattern is appropriate when all endian elements in a record are typically used regardless of record content or other circumstances

-

Convert generally only as needed, but locally in anticipation of need

+

Convert +generally only as needed, but locally in anticipation of need

-

This pattern in general defers conversion but does -anticipatory conversion for specific local needs.

+

This pattern in general defers conversion but for specific local needs does +anticipatory conversion.

This pattern is particularly appropriate when coupled with the endian buffer or arithmetic types.

-

Use cases

+

Use case examples

Porting endian unaware codebase

@@ -348,9 +348,9 @@ be maintained as big endian.

The endian arithmetic approach is recommended to meet these needs. A relatively small -number of header files dealing with binary I/O layouts need to change types like -short or int16_t to big_int16_t, and -int or int32_t to bif_int32_t. No +number of header files dealing with binary I/O layouts need to change types. For +example,  +short or int16_t would change to big_int16_t. No changes are required for .cpp files.

Porting endian aware codebase