Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
B
brpc
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
brpc
Commits
a78a34ea
Commit
a78a34ea
authored
Nov 21, 2020
by
jamesge
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix errors with clang++ 11 on MacOS Catalina
parent
b1f7ea03
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
7 deletions
+20
-7
foundation_util.h
src/butil/mac/foundation_util.h
+4
-4
document.h
src/butil/third_party/rapidjson/document.h
+7
-3
time.h
src/butil/time/time.h
+9
-0
No files found.
src/butil/mac/foundation_util.h
View file @
a78a34ea
...
@@ -37,17 +37,17 @@ class UIFont;
...
@@ -37,17 +37,17 @@ class UIFont;
#if __has_extension(cxx_strong_enums) && \
#if __has_extension(cxx_strong_enums) && \
(defined(OS_IOS) || (defined(MAC_OS_X_VERSION_10_8) && \
(defined(OS_IOS) || (defined(MAC_OS_X_VERSION_10_8) && \
MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_8))
MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_8))
#define CR_FORWARD_ENUM(_type, _name) enum _name : _type
_name
#define CR_FORWARD_ENUM(_type, _name) enum _name : _type
#else
#else
#define CR_FORWARD_ENUM(_type, _name) _type _name
#define CR_FORWARD_ENUM(_type, _name)
typedef
_type _name
#endif
#endif
// Adapted from NSPathUtilities.h and NSObjCRuntime.h.
// Adapted from NSPathUtilities.h and NSObjCRuntime.h.
#if __LP64__ || NS_BUILD_32_LIKE_64
#if __LP64__ || NS_BUILD_32_LIKE_64
typedef
CR_FORWARD_ENUM
(
unsigned
long
,
NSSearchPathDirectory
);
CR_FORWARD_ENUM
(
unsigned
long
,
NSSearchPathDirectory
);
typedef
unsigned
long
NSSearchPathDomainMask
;
typedef
unsigned
long
NSSearchPathDomainMask
;
#else
#else
typedef
CR_FORWARD_ENUM
(
unsigned
int
,
NSSearchPathDirectory
);
CR_FORWARD_ENUM
(
unsigned
int
,
NSSearchPathDirectory
);
typedef
unsigned
int
NSSearchPathDomainMask
;
typedef
unsigned
int
NSSearchPathDomainMask
;
#endif
#endif
...
...
src/butil/third_party/rapidjson/document.h
View file @
a78a34ea
...
@@ -315,6 +315,10 @@ struct GenericStringRef {
...
@@ -315,6 +315,10 @@ struct GenericStringRef {
GenericStringRef
(
const
CharType
*
str
,
SizeType
len
)
GenericStringRef
(
const
CharType
*
str
,
SizeType
len
)
:
s
(
str
),
length
(
len
)
{
RAPIDJSON_ASSERT
(
s
!=
NULL
);
}
:
s
(
str
),
length
(
len
)
{
RAPIDJSON_ASSERT
(
s
!=
NULL
);
}
// Required by clang++ 11 on MacOS catalina
GenericStringRef
(
const
GenericStringRef
&
other
)
:
s
(
other
.
s
),
length
(
other
.
length
)
{
RAPIDJSON_ASSERT
(
s
!=
NULL
);
}
//! implicit conversion to plain CharType pointer
//! implicit conversion to plain CharType pointer
operator
const
Ch
*
()
const
{
return
s
;
}
operator
const
Ch
*
()
const
{
return
s
;
}
...
@@ -322,11 +326,11 @@ struct GenericStringRef {
...
@@ -322,11 +326,11 @@ struct GenericStringRef {
const
SizeType
length
;
//!< length of the string (excluding the trailing NULL terminator)
const
SizeType
length
;
//!< length of the string (excluding the trailing NULL terminator)
private
:
private
:
//! Disallow copy-assignment
//! Disallow copy-
ctor&
assignment
GenericStringRef
operator
=
(
const
GenericStringRef
&
);
GenericStringRef
operator
=
(
const
GenericStringRef
&
)
=
delete
;
//! Disallow construction from non-const array
//! Disallow construction from non-const array
template
<
SizeType
N
>
template
<
SizeType
N
>
GenericStringRef
(
CharType
(
&
str
)[
N
])
/* = delete */
;
GenericStringRef
(
CharType
(
&
str
)[
N
])
=
delete
;
};
};
//! Mark a character pointer as constant string
//! Mark a character pointer as constant string
...
...
src/butil/time/time.h
View file @
a78a34ea
...
@@ -71,6 +71,9 @@ class BUTIL_EXPORT TimeDelta {
...
@@ -71,6 +71,9 @@ class BUTIL_EXPORT TimeDelta {
TimeDelta
()
:
delta_
(
0
)
{
TimeDelta
()
:
delta_
(
0
)
{
}
}
// Required by clang++ 11 on MacOS catalina
TimeDelta
(
const
TimeDelta
&
other
)
:
delta_
(
other
.
delta_
)
{}
// Converts units of time to TimeDeltas.
// Converts units of time to TimeDeltas.
static
TimeDelta
FromDays
(
int
days
);
static
TimeDelta
FromDays
(
int
days
);
static
TimeDelta
FromHours
(
int
hours
);
static
TimeDelta
FromHours
(
int
hours
);
...
@@ -269,6 +272,9 @@ class BUTIL_EXPORT Time {
...
@@ -269,6 +272,9 @@ class BUTIL_EXPORT Time {
Time
()
:
us_
(
0
)
{
Time
()
:
us_
(
0
)
{
}
}
// Required by clang++ 11 on MacOS catalina
Time
(
const
Time
&
other
)
:
us_
(
other
.
us_
)
{}
// Returns true if the time object has not been initialized.
// Returns true if the time object has not been initialized.
bool
is_null
()
const
{
bool
is_null
()
const
{
return
us_
==
0
;
return
us_
==
0
;
...
@@ -608,6 +614,9 @@ class BUTIL_EXPORT TimeTicks {
...
@@ -608,6 +614,9 @@ class BUTIL_EXPORT TimeTicks {
TimeTicks
()
:
ticks_
(
0
)
{
TimeTicks
()
:
ticks_
(
0
)
{
}
}
// Required by clang++ 11 on MacOS catalina
TimeTicks
(
const
TimeTicks
&
other
)
:
ticks_
(
other
.
ticks_
)
{}
// Platform-dependent tick count representing "right now."
// Platform-dependent tick count representing "right now."
// The resolution of this clock is ~1-15ms. Resolution varies depending
// The resolution of this clock is ~1-15ms. Resolution varies depending
// on hardware/operating system configuration.
// on hardware/operating system configuration.
...
...
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