Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
F
fmt
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
fmt
Commits
911a7511
Commit
911a7511
authored
Jun 04, 2018
by
Victor Zverovich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix nvcc warnings (#752)
parent
94b47628
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
7 deletions
+9
-7
include/fmt/core.h
include/fmt/core.h
+9
-7
No files found.
include/fmt/core.h
View file @
911a7511
...
@@ -787,8 +787,9 @@ class arg_map {
...
@@ -787,8 +787,9 @@ class arg_map {
~
arg_map
()
{
delete
[]
map_
;
}
~
arg_map
()
{
delete
[]
map_
;
}
basic_format_arg
<
Context
>
find
(
basic_string_view
<
char_type
>
name
)
const
{
basic_format_arg
<
Context
>
find
(
basic_string_view
<
char_type
>
name
)
const
{
auto
end
=
map_
+
size_
;
// Define end outside of loop to make nvcc happy.
// The list is unsorted, so just return the first matching name.
// The list is unsorted, so just return the first matching name.
for
(
auto
it
=
map_
,
end
=
map_
+
size_
;
it
!=
end
;
++
it
)
{
for
(
auto
it
=
map_
;
it
!=
end
;
++
it
)
{
if
(
it
->
name
==
name
)
if
(
it
->
name
==
name
)
return
it
->
arg
;
return
it
->
arg
;
}
}
...
@@ -973,16 +974,17 @@ class format_arg_store {
...
@@ -973,16 +974,17 @@ class format_arg_store {
friend
class
basic_format_args
<
Context
>
;
friend
class
basic_format_args
<
Context
>
;
static
FMT_CONSTEXPR
uint64_t
get_types
()
{
static
FMT_CONSTEXPR
int64_t
get_types
()
{
return
IS_PACKED
?
internal
::
get_types
<
Context
,
Args
...
>
()
return
IS_PACKED
?
:
-
static_cast
<
int64_t
>
(
NUM_ARGS
);
static_cast
<
int64_t
>
(
internal
::
get_types
<
Context
,
Args
...
>
())
:
-
static_cast
<
int64_t
>
(
NUM_ARGS
);
}
}
public:
public:
#if FMT_USE_CONSTEXPR
#if FMT_USE_CONSTEXPR
static
constexpr
u
int64_t
TYPES
=
get_types
();
static
constexpr
int64_t
TYPES
=
get_types
();
#else
#else
static
const
u
int64_t
TYPES
;
static
const
int64_t
TYPES
;
#endif
#endif
#if FMT_GCC_VERSION && FMT_GCC_VERSION <= 405
#if FMT_GCC_VERSION && FMT_GCC_VERSION <= 405
...
@@ -998,7 +1000,7 @@ class format_arg_store {
...
@@ -998,7 +1000,7 @@ class format_arg_store {
#if !FMT_USE_CONSTEXPR
#if !FMT_USE_CONSTEXPR
template
<
typename
Context
,
typename
...
Args
>
template
<
typename
Context
,
typename
...
Args
>
const
u
int64_t
format_arg_store
<
Context
,
Args
...
>::
TYPES
=
get_types
();
const
int64_t
format_arg_store
<
Context
,
Args
...
>::
TYPES
=
get_types
();
#endif
#endif
/**
/**
...
...
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