Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
K
KWSys
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sylvain Joubert
KWSys
Commits
4daf6c79
Commit
4daf6c79
authored
19 years ago
by
Andy Cedilnik
Browse files
Options
Downloads
Patches
Plain Diff
COMP: Remove some more warnings
parent
11ce5611
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Registry.cxx
+11
-13
11 additions, 13 deletions
Registry.cxx
with
11 additions
and
13 deletions
Registry.cxx
+
11
−
13
View file @
4daf6c79
...
@@ -482,7 +482,6 @@ bool RegistryHelper::Close()
...
@@ -482,7 +482,6 @@ bool RegistryHelper::Close()
#endif
#endif
if
(
m_RegistryType
==
Registry
::
UNIX_REGISTRY
)
if
(
m_RegistryType
==
Registry
::
UNIX_REGISTRY
)
{
{
int
res
=
0
;
if
(
!
m_Changed
)
if
(
!
m_Changed
)
{
{
this
->
EntriesMap
.
erase
(
this
->
EntriesMap
.
erase
(
...
@@ -490,24 +489,24 @@ bool RegistryHelper::Close()
...
@@ -490,24 +489,24 @@ bool RegistryHelper::Close()
this
->
EntriesMap
.
end
());
this
->
EntriesMap
.
end
());
m_Empty
=
1
;
m_Empty
=
1
;
this
->
SetSubKey
(
0
);
this
->
SetSubKey
(
0
);
return
1
;
return
true
;
}
}
kwsys_ios
::
ostringstream
str
;
kwsys_ios
::
ostringstream
str
;
if
(
!
getenv
(
"HOME"
)
)
if
(
!
getenv
(
"HOME"
)
)
{
{
return
0
;
return
false
;
}
}
str
<<
getenv
(
"HOME"
)
<<
"/."
<<
this
->
GetTopLevel
()
<<
"rc"
;
str
<<
getenv
(
"HOME"
)
<<
"/."
<<
this
->
GetTopLevel
()
<<
"rc"
;
kwsys_ios
::
ofstream
*
ofs
=
new
kwsys_ios
::
ofstream
(
str
.
str
().
c_str
(),
kwsys_ios
::
ios
::
out
);
kwsys_ios
::
ofstream
*
ofs
=
new
kwsys_ios
::
ofstream
(
str
.
str
().
c_str
(),
kwsys_ios
::
ios
::
out
);
if
(
!
ofs
)
if
(
!
ofs
)
{
{
return
0
;
return
false
;
}
}
if
(
ofs
->
fail
())
if
(
ofs
->
fail
())
{
{
delete
ofs
;
delete
ofs
;
return
0
;
return
false
;
}
}
*
ofs
<<
"# This file is automatically generated by the application"
<<
kwsys_ios
::
endl
*
ofs
<<
"# This file is automatically generated by the application"
<<
kwsys_ios
::
endl
<<
"# If you change any lines or add new lines, note that all"
<<
kwsys_ios
::
endl
<<
"# If you change any lines or add new lines, note that all"
<<
kwsys_ios
::
endl
...
@@ -531,10 +530,9 @@ bool RegistryHelper::Close()
...
@@ -531,10 +530,9 @@ bool RegistryHelper::Close()
this
->
EntriesMap
.
end
());
this
->
EntriesMap
.
end
());
ofs
->
close
();
ofs
->
close
();
delete
ofs
;
delete
ofs
;
res
=
1
;
this
->
SetSubKey
(
0
);
this
->
SetSubKey
(
0
);
m_Empty
=
1
;
m_Empty
=
1
;
return
res
;
return
true
;
}
}
return
false
;
return
false
;
}
}
...
@@ -557,18 +555,18 @@ bool RegistryHelper::ReadValue(const char *skey, char *value)
...
@@ -557,18 +555,18 @@ bool RegistryHelper::ReadValue(const char *skey, char *value)
#endif
#endif
if
(
m_RegistryType
==
Registry
::
UNIX_REGISTRY
)
if
(
m_RegistryType
==
Registry
::
UNIX_REGISTRY
)
{
{
int
res
=
0
;
bool
res
=
false
;
char
*
key
=
this
->
CreateKey
(
skey
);
char
*
key
=
this
->
CreateKey
(
skey
);
if
(
!
key
)
if
(
!
key
)
{
{
return
0
;
return
false
;
}
}
RegistryHelper
::
StringToStringMap
::
iterator
it
RegistryHelper
::
StringToStringMap
::
iterator
it
=
this
->
EntriesMap
.
find
(
key
);
=
this
->
EntriesMap
.
find
(
key
);
if
(
it
!=
this
->
EntriesMap
.
end
()
)
if
(
it
!=
this
->
EntriesMap
.
end
()
)
{
{
strcpy
(
value
,
it
->
second
.
c_str
());
strcpy
(
value
,
it
->
second
.
c_str
());
res
=
1
;
res
=
true
;
}
}
delete
[]
key
;
delete
[]
key
;
return
res
;
return
res
;
...
@@ -590,7 +588,7 @@ bool RegistryHelper::DeleteKey(const char* key)
...
@@ -590,7 +588,7 @@ bool RegistryHelper::DeleteKey(const char* key)
if
(
m_RegistryType
==
Registry
::
UNIX_REGISTRY
)
if
(
m_RegistryType
==
Registry
::
UNIX_REGISTRY
)
{
{
(
void
)
key
;
(
void
)
key
;
int
res
=
0
;
bool
res
=
false
;
return
res
;
return
res
;
}
}
return
false
;
return
false
;
...
@@ -612,11 +610,11 @@ bool RegistryHelper::DeleteValue(const char *skey)
...
@@ -612,11 +610,11 @@ bool RegistryHelper::DeleteValue(const char *skey)
char
*
key
=
this
->
CreateKey
(
skey
);
char
*
key
=
this
->
CreateKey
(
skey
);
if
(
!
key
)
if
(
!
key
)
{
{
return
0
;
return
false
;
}
}
this
->
EntriesMap
.
erase
(
key
);
this
->
EntriesMap
.
erase
(
key
);
delete
[]
key
;
delete
[]
key
;
return
1
;
return
true
;
}
}
return
false
;
return
false
;
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment