Skip to content

Commit d3fbd8a

Browse files
authored
use lock result instead of checking expired (#10)
* use lock result instead of checking expired * v2.0.1 * fix intellisense mistake
1 parent f68ef96 commit d3fbd8a

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 3.5 FATAL_ERROR)
33
# ---- Project ----
44

55
project(LarsEvent
6-
VERSION 2.0
6+
VERSION 2.0.1
77
LANGUAGES CXX
88
)
99

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ With [CPM](https://github.com/TheLartians/CPM), lars::Event can be added to your
3636
```cmake
3737
CPMAddPackage(
3838
NAME LarsEvent
39-
VERSION 2.0
39+
VERSION 2.0.1
4040
GIT_REPOSITORY https://github.com/TheLartians/Event.git
4141
)
4242

include/lars/event.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,8 @@ namespace lars{
9090
}
9191

9292
void reset(){
93-
if(!parent.expired()){
94-
(*parent.lock())->eraseHandler(id);
93+
if(auto p = parent.lock()){
94+
(*p)->eraseHandler(id);
9595
}
9696
parent.reset();
9797
}

0 commit comments

Comments
 (0)