Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
U
uniset2
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
UniSet project repositories
uniset2
Commits
e1c15905
Commit
e1c15905
authored
Oct 27, 2015
by
Pavel Vainerman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Coverity scan:
[ fixed ] CID 22705: Resource leak (RESOURCE_LEAK)
parent
db06f342
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
8 deletions
+8
-8
DebugStream.h
include/DebugStream.h
+6
-6
DebugStream.cc
src/Log/DebugStream.cc
+2
-2
No files found.
include/DebugStream.h
View file @
e1c15905
...
@@ -269,19 +269,19 @@ class DebugStream : public std::ostream
...
@@ -269,19 +269,19 @@ class DebugStream : public std::ostream
// private:
// private:
/// The current debug level
/// The current debug level
Debug
::
type
dt
;
Debug
::
type
dt
=
{
Debug
::
NONE
}
;
/// The no-op stream.
/// The no-op stream.
std
::
ostream
nullstream
;
std
::
ostream
nullstream
;
///
///
struct
debugstream_internal
;
struct
debugstream_internal
;
///
///
debugstream_internal
*
internal
;
debugstream_internal
*
internal
=
{
0
}
;
bool
show_datetime
;
bool
show_datetime
=
{
true
}
;
bool
show_logtype
;
bool
show_logtype
=
{
true
}
;
std
::
string
fname
;
std
::
string
fname
=
{
""
}
;
StreamEvent_Signal
s_stream
;
StreamEvent_Signal
s_stream
;
std
::
string
logname
;
std
::
string
logname
=
{
""
}
;
bool
isWriteLogFile
=
{
false
};
bool
isWriteLogFile
=
{
false
};
};
};
...
...
src/Log/DebugStream.cc
View file @
e1c15905
...
@@ -43,7 +43,7 @@ using std::ios;
...
@@ -43,7 +43,7 @@ using std::ios;
/// Constructor, sets the debug level to t.
/// Constructor, sets the debug level to t.
DebugStream
::
DebugStream
(
Debug
::
type
t
)
DebugStream
::
DebugStream
(
Debug
::
type
t
)
:
ostream
(
new
debugbuf
(
cerr
.
rdbuf
())),
:
/* ostream(new debugbuf(cerr.rdbuf())),*/
dt
(
t
),
nullstream
(
new
nullbuf
),
internal
(
new
debugstream_internal
),
dt
(
t
),
nullstream
(
new
nullbuf
),
internal
(
new
debugstream_internal
),
show_datetime
(
true
),
show_logtype
(
true
),
show_datetime
(
true
),
show_logtype
(
true
),
fname
(
""
),
fname
(
""
),
...
@@ -56,7 +56,7 @@ DebugStream::DebugStream(Debug::type t)
...
@@ -56,7 +56,7 @@ DebugStream::DebugStream(Debug::type t)
//--------------------------------------------------------------------------
//--------------------------------------------------------------------------
/// Constructor, sets the log file to f, and the debug level to t.
/// Constructor, sets the log file to f, and the debug level to t.
DebugStream
::
DebugStream
(
char
const
*
f
,
Debug
::
type
t
,
bool
truncate
)
DebugStream
::
DebugStream
(
char
const
*
f
,
Debug
::
type
t
,
bool
truncate
)
:
ostream
(
new
debugbuf
(
cerr
.
rdbuf
())),
:
/* ostream(new debugbuf(cerr.rdbuf())), */
dt
(
t
),
nullstream
(
new
nullbuf
),
dt
(
t
),
nullstream
(
new
nullbuf
),
internal
(
new
debugstream_internal
),
internal
(
new
debugstream_internal
),
show_datetime
(
true
),
show_logtype
(
true
),
show_datetime
(
true
),
show_logtype
(
true
),
...
...
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