Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
googletest
Project
Overview
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
googletest
Commits
c38f4b9f
Unverified
Commit
c38f4b9f
authored
Aug 16, 2018
by
Gennadiy Civil
Committed by
GitHub
Aug 16, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Small style changes.
Just small style changes and we can accept this PR
parent
f3a9fa6a
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
10 deletions
+4
-10
gtest-port.cc
googletest/src/gtest-port.cc
+4
-10
No files found.
googletest/src/gtest-port.cc
View file @
c38f4b9f
...
@@ -306,7 +306,7 @@ namespace {
...
@@ -306,7 +306,7 @@ namespace {
//
//
class
MemoryIsNotDeallocated
class
MemoryIsNotDeallocated
{
{
public
:
public
:
MemoryIsNotDeallocated
()
:
old_crtdbg_flag_
(
0
)
{
MemoryIsNotDeallocated
()
:
old_crtdbg_flag_
(
0
)
{
#ifdef _MSC_VER
#ifdef _MSC_VER
old_crtdbg_flag_
=
_CrtSetDbgFlag
(
_CRTDBG_REPORT_FLAG
);
old_crtdbg_flag_
=
_CrtSetDbgFlag
(
_CRTDBG_REPORT_FLAG
);
...
@@ -323,7 +323,7 @@ public:
...
@@ -323,7 +323,7 @@ public:
#endif // _MSC_VER
#endif // _MSC_VER
}
}
private
:
private
:
int
old_crtdbg_flag_
;
int
old_crtdbg_flag_
;
GTEST_DISALLOW_COPY_AND_ASSIGN_
(
MemoryIsNotDeallocated
);
GTEST_DISALLOW_COPY_AND_ASSIGN_
(
MemoryIsNotDeallocated
);
...
@@ -584,17 +584,11 @@ class ThreadLocalRegistryImpl {
...
@@ -584,17 +584,11 @@ class ThreadLocalRegistryImpl {
return
0
;
return
0
;
}
}
// Return a newly constructed ThreadIdToThreadLocals that's intentionally never deleted
static
ThreadIdToThreadLocals
*
NewThreadIdToThreadLocals
()
{
// Use RAII to flag that following mem alloc is never deallocated.
MemoryIsNotDeallocated
memory_is_not_deallocated
;
return
new
ThreadIdToThreadLocals
;
}
// Returns map of thread local instances.
// Returns map of thread local instances.
static
ThreadIdToThreadLocals
*
GetThreadLocalsMapLocked
()
{
static
ThreadIdToThreadLocals
*
GetThreadLocalsMapLocked
()
{
mutex_
.
AssertHeld
();
mutex_
.
AssertHeld
();
static
ThreadIdToThreadLocals
*
map
=
NewThreadIdToThreadLocals
();
MemoryIsNotDeallocated
memory_is_not_deallocated
;
static
ThreadIdToThreadLocals
*
map
=
new
ThreadIdToThreadLocals
();
return
map
;
return
map
;
}
}
...
...
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