summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKUDr <KUDr@openttd.org>2007-07-21 13:45:15 +0000
committerKUDr <KUDr@openttd.org>2007-07-21 13:45:15 +0000
commitfc58c73bc5e1d9c8ff64fca878d93ef4be1623bd (patch)
tree2c35f6c88c968b199d641414707e3a97c76fc5ac /src
parent1f693e8ce81ae8761287d45771785d65dd9d87fa (diff)
downloadopenttd-fc58c73bc5e1d9c8ff64fca878d93ef4be1623bd.tar.xz
(svn r10646) -Cleanup: AutoPtrT<>::Release() renamed to Detach()
-better describes what it does -was inconsistent with CCountedPtr<>::Release()
Diffstat (limited to 'src')
-rw-r--r--src/misc/autoptr.hpp2
-rw-r--r--src/station_cmd.cpp12
2 files changed, 7 insertions, 7 deletions
diff --git a/src/misc/autoptr.hpp b/src/misc/autoptr.hpp
index 3719a51f1..edb7c10c6 100644
--- a/src/misc/autoptr.hpp
+++ b/src/misc/autoptr.hpp
@@ -45,7 +45,7 @@ public:
}
/** give-up ownership and NULLify the raw pointer */
- FORCEINLINE T* Release()
+ FORCEINLINE T* Detach()
{
T* p = m_p;
m_p = NULL;
diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp
index 379bac43e..a5c8df484 100644
--- a/src/station_cmd.cpp
+++ b/src/station_cmd.cpp
@@ -982,7 +982,7 @@ CommandCost CmdBuildRailroadStation(TileIndex tile_org, uint32 flags, uint32 p1,
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 @@ CommandCost CmdBuildRoadStop(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
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 @@ CommandCost CmdBuildAirport(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
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 @@ CommandCost CmdBuildBuoy(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
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 @@ CommandCost CmdBuildDock(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
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);
}