Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
G
gflags
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
gflags
Commits
6e9f4166
Commit
6e9f4166
authored
Mar 19, 2014
by
Andreas Schuh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
No need to export CommandLineFlagInfo data only structure from DLL.
parent
d8c6a552
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
10 deletions
+3
-10
gflags.h
src/gflags.h
+3
-10
No files found.
src/gflags.h
View file @
6e9f4166
...
...
@@ -149,13 +149,9 @@ extern GFLAGS_DLL_DECL bool RegisterFlagValidator(const std::string* flag, bool
// In addition to accessing flags, you can also access argv[0] (the program
// name) and argv (the entire commandline), which we sock away a copy of.
// These variables are static, so you should only set them once.
#ifdef _MSC_VER
# pragma warning(push)
// The solution offered at http://support.microsoft.com/default.aspx?scid=KB;EN-US;168958
// is not really desireable as we don't want to explicitly instantiate/export any STL types
# pragma warning(disable: 4251)
#endif
struct
GFLAGS_DLL_DECL
CommandLineFlagInfo
{
//
// No need to export this data only structure from DLL, avoiding VS warning 4251.
struct
CommandLineFlagInfo
{
std
::
string
name
;
// the name of the flag
std
::
string
type
;
// the type of the flag: int32, etc
std
::
string
description
;
// the "help text" associated with the flag
...
...
@@ -168,9 +164,6 @@ struct GFLAGS_DLL_DECL CommandLineFlagInfo {
// or via SetCommandLineOption
const
void
*
flag_ptr
;
// pointer to the flag's current value (i.e. FLAGS_foo)
};
#ifdef _MSC_VER
# pragma warning(pop)
#endif
// Using this inside of a validator is a recipe for a deadlock.
// TODO(user) Fix locking when validators are running, to make it safe to
...
...
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