aboutsummaryrefslogtreecommitdiff
path: root/src/system_wrappers/interface/static_instance.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/system_wrappers/interface/static_instance.h')
-rw-r--r--src/system_wrappers/interface/static_instance.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/system_wrappers/interface/static_instance.h b/src/system_wrappers/interface/static_instance.h
index 8fe91cc3e4..b670f969c9 100644
--- a/src/system_wrappers/interface/static_instance.h
+++ b/src/system_wrappers/interface/static_instance.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
+ * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
@@ -128,10 +128,8 @@ static T* GetStaticInstance(CountOperation count_operation) {
// local copy.
T* new_instance = T::CreateInstance();
if (1 == InterlockedIncrement(&instance_count)) {
- T* old_value = static_cast<T*> (InterlockedExchangePointer(
- reinterpret_cast<void* volatile*>(&instance), new_instance));
- assert(old_value == NULL);
- assert(instance);
+ InterlockedExchangePointer(reinterpret_cast<void* volatile*>(&instance),
+ new_instance);
} else {
InterlockedDecrement(&instance_count);
if (new_instance) {