Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
P
protobuf
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
protobuf
Commits
2350e20c
Commit
2350e20c
authored
Mar 27, 2019
by
Ben Boeckel
Committed by
Adam Cozzette
Mar 28, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mathlimits: remove no-op macro expansion code
parent
3071fc31
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
24 deletions
+0
-24
mathlimits.cc
src/google/protobuf/stubs/mathlimits.cc
+0
-24
No files found.
src/google/protobuf/stubs/mathlimits.cc
View file @
2350e20c
...
...
@@ -40,11 +40,6 @@
namespace
google
{
namespace
protobuf
{
#define DEF_COMMON_LIMITS(Type)
#define DEF_UNSIGNED_INT_LIMITS(Type)
#define DEF_SIGNED_INT_LIMITS(Type)
#define DEF_PRECISION_LIMITS(Type)
// http://en.wikipedia.org/wiki/Quadruple_precision_floating-point_format#Double-double_arithmetic
// With some compilers (gcc 4.6.x) on some platforms (powerpc64),
// "long double" is implemented as a pair of double: "double double" format.
...
...
@@ -70,7 +65,6 @@ namespace protobuf {
// max(DBL_EPSILON * DBL_EPSILON, kEpsilon) rather than a multiple of kEpsilon.
#define DEF_FP_LIMITS(Type, PREFIX) \
DEF_COMMON_LIMITS(Type) \
const Type MathLimits<Type>::kPosMin = PREFIX##_MIN; \
const Type MathLimits<Type>::kPosMax = PREFIX##_MAX; \
const Type MathLimits<Type>::kMin = -MathLimits<Type>::kPosMax; \
...
...
@@ -82,32 +76,14 @@ const Type MathLimits<Type>::kEpsilon = PREFIX##_EPSILON; \
const Type MathLimits<Type>::kStdError = \
32 * (DBL_EPSILON * DBL_EPSILON > MathLimits<Type>::kEpsilon \
? DBL_EPSILON * DBL_EPSILON : MathLimits<Type>::kEpsilon); \
DEF_PRECISION_LIMITS(Type) \
const Type MathLimits<Type>::kNaN = HUGE_VAL - HUGE_VAL; \
const Type MathLimits<Type>::kPosInf = HUGE_VAL; \
const Type MathLimits<Type>::kNegInf = -HUGE_VAL;
// The following are *not* casts!
DEF_SIGNED_INT_LIMITS
(
int8
)
DEF_SIGNED_INT_LIMITS
(
int16
)
// NOLINT(readability/casting)
DEF_SIGNED_INT_LIMITS
(
int32
)
// NOLINT(readability/casting)
DEF_SIGNED_INT_LIMITS
(
int64
)
// NOLINT(readability/casting)
DEF_UNSIGNED_INT_LIMITS
(
uint8
)
DEF_UNSIGNED_INT_LIMITS
(
uint16
)
// NOLINT(readability/casting)
DEF_UNSIGNED_INT_LIMITS
(
uint32
)
// NOLINT(readability/casting)
DEF_UNSIGNED_INT_LIMITS
(
uint64
)
// NOLINT(readability/casting)
DEF_SIGNED_INT_LIMITS
(
long
int
)
DEF_UNSIGNED_INT_LIMITS
(
unsigned
long
int
)
DEF_FP_LIMITS
(
float
,
FLT
)
DEF_FP_LIMITS
(
double
,
DBL
)
DEF_FP_LIMITS
(
long
double
,
LDBL
);
#undef DEF_COMMON_LIMITS
#undef DEF_SIGNED_INT_LIMITS
#undef DEF_UNSIGNED_INT_LIMITS
#undef DEF_FP_LIMITS
#undef DEF_PRECISION_LIMITS
}
// namespace protobuf
}
// namespace google
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment