diff options
author | lloyd <[email protected]> | 2006-06-25 06:11:27 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2006-06-25 06:11:27 +0000 |
commit | 7d93f51229600248cc009252221f1be988978624 (patch) | |
tree | 62da33a7e8729e636fbb9e403dcb9c9f69349760 /src | |
parent | c245cbdee2e3df68fa626c7e48e1a2f9e8b83e6b (diff) |
Make set_global_state a little more elegant, by having it delete
the return value of swap_global_state rather than manipulate the
state object directly.
Diffstat (limited to 'src')
-rw-r--r-- | src/libstate.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/libstate.cpp b/src/libstate.cpp index 546e11c90..114b88682 100644 --- a/src/libstate.cpp +++ b/src/libstate.cpp @@ -31,8 +31,7 @@ Library_State& global_state() void set_global_state(Library_State* new_state) { - delete global_lib_state; - global_lib_state = new_state; + delete swap_global_state(new_state); } Library_State* swap_global_state(Library_State* new_state) |