Mercurial > hg > openttd
changeset 7298:b30b64f784db draft
(svn r10646) -Cleanup: AutoPtrT<>::Release() renamed to Detach()
-better describes what it does
-was inconsistent with CCountedPtr<>::Release()
author | KUDr <KUDr@openttd.org> |
---|---|
date | Sat, 21 Jul 2007 13:45:15 +0000 |
parents | 2d5412e07b5e |
children | e0f305cf3f08 |
files | src/misc/autoptr.hpp src/station_cmd.cpp |
diffstat | 2 files changed, 7 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/src/misc/autoptr.hpp +++ b/src/misc/autoptr.hpp @@ -45,7 +45,7 @@ } /** give-up ownership and NULLify the raw pointer */ - FORCEINLINE T* Release() + FORCEINLINE T* Detach() { T* p = m_p; m_p = NULL;
--- a/src/station_cmd.cpp +++ b/src/station_cmd.cpp @@ -982,7 +982,7 @@ RebuildStationLists(); InvalidateWindow(WC_STATION_LIST, st->owner); /* success, so don't delete the new station */ - st_auto_delete.Release(); + st_auto_delete.Detach(); } return cost; @@ -1361,8 +1361,8 @@ RebuildStationLists(); InvalidateWindow(WC_STATION_LIST, st->owner); /* success, so don't delete the new station and the new road stop */ - st_auto_delete.Release(); - rs_auto_delete.Release(); + st_auto_delete.Detach(); + rs_auto_delete.Detach(); } return cost; } @@ -1668,7 +1668,7 @@ RebuildStationLists(); InvalidateWindow(WC_STATION_LIST, st->owner); /* success, so don't delete the new station */ - st_auto_delete.Release(); + st_auto_delete.Detach(); } return cost; @@ -1764,7 +1764,7 @@ RebuildStationLists(); InvalidateWindow(WC_STATION_LIST, st->owner); /* success, so don't delete the new station */ - st_auto_delete.Release(); + st_auto_delete.Detach(); } return CommandCost(_price.build_dock); @@ -1931,7 +1931,7 @@ RebuildStationLists(); InvalidateWindow(WC_STATION_LIST, st->owner); /* success, so don't delete the new station */ - st_auto_delete.Release(); + st_auto_delete.Detach(); } return CommandCost(_price.build_dock); }