Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use SRWLOCK_INIT to statically initialize stl_critical_section_win7::m_srw_lock #3522

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions stl/src/primitives.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,7 @@ namespace Concurrency {

class stl_critical_section_win7 final : public stl_critical_section_interface {
public:
stl_critical_section_win7() {
InitializeSRWLock(&m_srw_lock);
}
stl_critical_section_win7() {}
StephanTLavavej marked this conversation as resolved.
Show resolved Hide resolved

~stl_critical_section_win7() = delete;
stl_critical_section_win7(const stl_critical_section_win7&) = delete;
Expand Down Expand Up @@ -62,7 +60,7 @@ namespace Concurrency {
}

private:
SRWLOCK m_srw_lock;
SRWLOCK m_srw_lock = SRWLOCK_INIT;
};

class stl_condition_variable_win7 final : public stl_condition_variable_interface {
Expand Down