28#ifndef DOUBLE_CONVERSION_UTILS_H_
29#define DOUBLE_CONVERSION_UTILS_H_
38#if __cplusplus >= 201103L
39#define DOUBLE_CONVERSION_NULLPTR nullptr
41#define DOUBLE_CONVERSION_NULLPTR NULL
45#ifndef DOUBLE_CONVERSION_ASSERT
46#define DOUBLE_CONVERSION_ASSERT(condition) \
49#if defined(DOUBLE_CONVERSION_NON_PREFIXED_MACROS) && !defined(ASSERT)
50#define ASSERT DOUBLE_CONVERSION_ASSERT
53#ifndef DOUBLE_CONVERSION_UNIMPLEMENTED
54#define DOUBLE_CONVERSION_UNIMPLEMENTED() (abort())
56#if defined(DOUBLE_CONVERSION_NON_PREFIXED_MACROS) && !defined(UNIMPLEMENTED)
57#define UNIMPLEMENTED DOUBLE_CONVERSION_UNIMPLEMENTED
60#ifndef DOUBLE_CONVERSION_NO_RETURN
62#define DOUBLE_CONVERSION_NO_RETURN __declspec(noreturn)
64#define DOUBLE_CONVERSION_NO_RETURN __attribute__((noreturn))
67#if defined(DOUBLE_CONVERSION_NON_PREFIXED_MACROS) && !defined(NO_RETURN)
68#define NO_RETURN DOUBLE_CONVERSION_NO_RETURN
71#ifndef DOUBLE_CONVERSION_UNREACHABLE
74inline void abort_noreturn() { abort(); }
75#define DOUBLE_CONVERSION_UNREACHABLE() (abort_noreturn())
77#define DOUBLE_CONVERSION_UNREACHABLE() (abort())
80#if defined(DOUBLE_CONVERSION_NON_PREFIXED_MACROS) && !defined(UNREACHABLE)
81#define UNREACHABLE DOUBLE_CONVERSION_UNREACHABLE
87# define DOUBLE_CONVERSION_HAS_ATTRIBUTE(x) __has_attribute(x)
89# define DOUBLE_CONVERSION_HAS_ATTRIBUTE(x) 0
92#ifndef DOUBLE_CONVERSION_UNUSED
93#if DOUBLE_CONVERSION_HAS_ATTRIBUTE(unused)
94#define DOUBLE_CONVERSION_UNUSED __attribute__((unused))
96#define DOUBLE_CONVERSION_UNUSED
99#if defined(DOUBLE_CONVERSION_NON_PREFIXED_MACROS) && !defined(UNUSED)
100#define UNUSED DOUBLE_CONVERSION_UNUSED
103#if DOUBLE_CONVERSION_HAS_ATTRIBUTE(uninitialized)
104#define DOUBLE_CONVERSION_STACK_UNINITIALIZED __attribute__((uninitialized))
106#define DOUBLE_CONVERSION_STACK_UNINITIALIZED
108#if defined(DOUBLE_CONVERSION_NON_PREFIXED_MACROS) && !defined(STACK_UNINITIALIZED)
109#define STACK_UNINITIALIZED DOUBLE_CONVERSION_STACK_UNINITIALIZED
138#if defined(_M_X64) || defined(__x86_64__) || \
139 defined(__ARMEL__) || defined(__avr32__) || defined(_M_ARM) || defined(_M_ARM64) || \
140 defined(__hppa__) || defined(__ia64__) || \
141 defined(__mips__) || \
142 defined(__loongarch__) || \
143 defined(__nios2__) || defined(__ghs) || \
144 defined(__powerpc__) || defined(__ppc__) || defined(__ppc64__) || \
145 defined(_POWER) || defined(_ARCH_PPC) || defined(_ARCH_PPC64) || \
146 defined(__sparc__) || defined(__sparc) || defined(__s390__) || \
147 defined(__SH4__) || defined(__alpha__) || \
148 defined(_MIPS_ARCH_MIPS32R2) || defined(__ARMEB__) ||\
149 defined(__AARCH64EL__) || defined(__aarch64__) || defined(__AARCH64EB__) || \
150 defined(__riscv) || defined(__e2k__) || \
151 defined(__or1k__) || defined(__arc__) || defined(__ARC64__) || \
152 defined(__microblaze__) || defined(__XTENSA__) || \
153 defined(__EMSCRIPTEN__) || defined(__wasm32__)
154#define DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS 1
155#elif defined(__mc68000__) || \
156 defined(__pnacl__) || defined(__native_client__)
157#undef DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS
158#elif defined(_M_IX86) || defined(__i386__) || defined(__i386)
161#define DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS 1
163#undef DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS
166#error Target architecture was not detected as supported by Double-Conversion.
168#if defined(DOUBLE_CONVERSION_NON_PREFIXED_MACROS) && !defined(CORRECT_DOUBLE_OPERATIONS)
169#define CORRECT_DOUBLE_OPERATIONS DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS
172#if defined(_WIN32) && !defined(__MINGW32__)
174typedef signed char int8_t;
175typedef unsigned char uint8_t;
176typedef short int16_t;
177typedef unsigned short uint16_t;
179typedef unsigned int uint32_t;
180typedef __int64 int64_t;
181typedef unsigned __int64 uint64_t;
195#define DOUBLE_CONVERSION_UINT64_2PART_C(a, b) (((static_cast<uint64_t>(a) << 32) + 0x##b##u))
196#if defined(DOUBLE_CONVERSION_NON_PREFIXED_MACROS) && !defined(UINT64_2PART_C)
197#define UINT64_2PART_C DOUBLE_CONVERSION_UINT64_2PART_C
204#ifndef DOUBLE_CONVERSION_ARRAY_SIZE
205#define DOUBLE_CONVERSION_ARRAY_SIZE(a) \
206 ((sizeof(a) / sizeof(*(a))) / \
207 static_cast<size_t>(!(sizeof(a) % sizeof(*(a)))))
209#if defined(DOUBLE_CONVERSION_NON_PREFIXED_MACROS) && !defined(ARRAY_SIZE)
210#define ARRAY_SIZE DOUBLE_CONVERSION_ARRAY_SIZE
215#ifndef DOUBLE_CONVERSION_DISALLOW_COPY_AND_ASSIGN
216#define DOUBLE_CONVERSION_DISALLOW_COPY_AND_ASSIGN(TypeName) \
217 TypeName(const TypeName&); \
218 void operator=(const TypeName&)
220#if defined(DOUBLE_CONVERSION_NON_PREFIXED_MACROS) && !defined(DC_DISALLOW_COPY_AND_ASSIGN)
221#define DC_DISALLOW_COPY_AND_ASSIGN DOUBLE_CONVERSION_DISALLOW_COPY_AND_ASSIGN
230#ifndef DOUBLE_CONVERSION_DISALLOW_IMPLICIT_CONSTRUCTORS
231#define DOUBLE_CONVERSION_DISALLOW_IMPLICIT_CONSTRUCTORS(TypeName) \
233 DOUBLE_CONVERSION_DISALLOW_COPY_AND_ASSIGN(TypeName)
235#if defined(DOUBLE_CONVERSION_NON_PREFIXED_MACROS) && !defined(DC_DISALLOW_IMPLICIT_CONSTRUCTORS)
236#define DC_DISALLOW_IMPLICIT_CONSTRUCTORS DOUBLE_CONVERSION_DISALLOW_IMPLICIT_CONSTRUCTORS
242 size_t length = strlen(
string);
244 return static_cast<int>(length);
252 Vector(T* data,
int len) : start_(data), length_(len) {
277 return start_[
index];
282 T&
last() {
return start_[length_ - 1]; }
301 : buffer_(buffer, buffer_size), position_(0) { }
305 int size()
const {
return buffer_.length(); }
322 buffer_[position_++] = c;
336 memmove(&buffer_[position_], s,
static_cast<size_t>(n));
344 for (
int i = 0; i < count; i++) {
352 buffer_[position_] =
'\0';
358 return buffer_.start();
365 bool is_finalized()
const {
return position_ < 0; }
394template <
class Dest,
class Source>
398#if __cplusplus >= 201103L
399 static_assert(
sizeof(Dest) ==
sizeof(Source),
400 "source and destination size mismatch");
403 typedef char VerifySizesAreEqual[
sizeof(Dest) ==
sizeof(Source) ? 1 : -1];
407 memmove(&dest, &
source,
sizeof(dest));
411template <
class Dest,
class Source>
and restrictions which apply to each piece of software is included later in this file and or inside of the individual applicable source files The disclaimer of warranty in the WPILib license above applies to all code in and nothing in any of the other licenses gives permission to use the names of FIRST nor the names of the WPILib contributors to endorse or promote products derived from this software The following pieces of software have additional or alternate and or glfw and nanopb were modified for use in Google Inc All rights reserved Redistribution and use in source and binary with or without are permitted provided that the following conditions are this list of conditions and the following disclaimer *Redistributions in binary form must reproduce the above copyright this list of conditions and the following disclaimer in the documentation and or other materials provided with the distribution *Neither the name of Google Inc nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY EXPRESS OR IMPLIED BUT NOT LIMITED THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY OR CONSEQUENTIAL WHETHER IN STRICT OR EVEN IF ADVISED OF THE POSSIBILITY OF SUCH January AND DISTRIBUTION Definitions License shall mean the terms and conditions for and distribution as defined by Sections through of this document Licensor shall mean the copyright owner or entity authorized by the copyright owner that is granting the License Legal Entity shall mean the union of the acting entity and all other entities that control are controlled by or are under common control with that entity For the purposes of this definition control direct or to cause the direction or management of such whether by contract or including but not limited to software source documentation source
Definition ThirdPartyNotices.txt:119
and restrictions which apply to each piece of software is included later in this file and or inside of the individual applicable source files The disclaimer of warranty in the WPILib license above applies to all code in and nothing in any of the other licenses gives permission to use the names of FIRST nor the names of the WPILib contributors to endorse or promote products derived from this software The following pieces of software have additional or alternate and or glfw and nanopb were modified for use in Google Inc All rights reserved Redistribution and use in source and binary with or without are permitted provided that the following conditions are this list of conditions and the following disclaimer *Redistributions in binary form must reproduce the above copyright this list of conditions and the following disclaimer in the documentation and or other materials provided with the distribution *Neither the name of Google Inc nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY EXPRESS OR IMPLIED BUT NOT LIMITED THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY OR CONSEQUENTIAL WHETHER IN STRICT OR EVEN IF ADVISED OF THE POSSIBILITY OF SUCH January AND DISTRIBUTION Definitions License shall mean the terms and conditions for and distribution as defined by Sections through of this document Licensor shall mean the copyright owner or entity authorized by the copyright owner that is granting the License Legal Entity shall mean the union of the acting entity and all other entities that control are controlled by or are under common control with that entity For the purposes of this definition control direct or to cause the direction or management of such whether by contract or including but not limited to software source documentation and configuration files Object form shall mean any form resulting from mechanical transformation or translation of a Source including but not limited to compiled object generated and conversions to other media types Work shall mean the work of whether in Source or Object made available under the as indicated by a copyright notice that is included in or attached to the whether in Source or Object that is based or other modifications as a an original work of authorship For the purposes of this Derivative Works shall not include works that remain separable from
Definition ThirdPartyNotices.txt:136
@ index
Definition base.h:690
void AddPadding(char c, int count)
Definition utils.h:343
void AddString(const char *s)
Definition utils.h:327
void AddCharacter(char c)
Definition utils.h:319
void Reset()
Definition utils.h:314
char * Finalize()
Definition utils.h:350
StringBuilder(char *buffer, int buffer_size)
Definition utils.h:300
int position() const
Definition utils.h:308
void AddSubstring(const char *s, int n)
Definition utils.h:333
~StringBuilder()
Definition utils.h:303
int size() const
Definition utils.h:305
void pop_back()
Definition utils.h:284
Vector(T *data, int len)
Definition utils.h:252
T & first()
Definition utils.h:280
bool is_empty() const
Definition utils.h:269
Vector()
Definition utils.h:251
T & operator[](int index) const
Definition utils.h:275
int length() const
Definition utils.h:266
Vector< T > SubVector(int from, int to)
Definition utils.h:258
T & last()
Definition utils.h:282
T * start() const
Definition utils.h:272
Dest BitCast(const Source &source)
Definition utils.h:395
int StrLength(const char *string)
Definition utils.h:241
#define DOUBLE_CONVERSION_NULLPTR
Definition utils.h:41
#define DOUBLE_CONVERSION_UNUSED
Definition utils.h:96
#define DOUBLE_CONVERSION_ASSERT(condition)
Definition utils.h:46
uint16_t uc16
Definition utils.h:190
#define DOUBLE_CONVERSION_NO_RETURN
Definition utils.h:64
#define DOUBLE_CONVERSION_DISALLOW_IMPLICIT_CONSTRUCTORS(TypeName)
Definition utils.h:231