summaryrefslogtreecommitdiff
path: root/src/window.cpp
diff options
context:
space:
mode:
authoralberth <alberth@openttd.org>2010-07-31 21:43:07 +0000
committeralberth <alberth@openttd.org>2010-07-31 21:43:07 +0000
commit7aabb887d4b613d02addf5b705d15c5f2c329208 (patch)
tree122ebe335d3f897b0ac451ffa701981258c65400 /src/window.cpp
parentb65a9eb85629006336e16db707bbc2a8a84c8593 (diff)
downloadopenttd-7aabb887d4b613d02addf5b705d15c5f2c329208.tar.xz
(svn r20269) -Codechange: Use IsLocalCompany() everywhere, document the function and two company globals.
Diffstat (limited to 'src/window.cpp')
-rw-r--r--src/window.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/window.cpp b/src/window.cpp
index 6bbc140f9..a0e1c4c54 100644
--- a/src/window.cpp
+++ b/src/window.cpp
@@ -1974,7 +1974,7 @@ void HandleKeypress(uint32 raw_key)
{
/* World generation is multithreaded and messes with companies.
* But there is no company related window open anyway, so _current_company is not used. */
- assert(IsGeneratingWorld() || _local_company == _current_company);
+ assert(IsGeneratingWorld() || IsLocalCompany());
/* Setup event */
uint16 key = GB(raw_key, 0, 16);
@@ -2135,7 +2135,7 @@ static void MouseLoop(MouseClick click, int mousewheel)
{
/* World generation is multithreaded and messes with companies.
* But there is no company related window open anyway, so _current_company is not used. */
- assert(IsGeneratingWorld() || _local_company == _current_company);
+ assert(IsGeneratingWorld() || IsLocalCompany());
HandlePlacePresize();
UpdateTileSelection();
@@ -2241,7 +2241,7 @@ void HandleMouseEvents()
{
/* World generation is multithreaded and messes with companies.
* But there is no company related window open anyway, so _current_company is not used. */
- assert(IsGeneratingWorld() || _local_company == _current_company);
+ assert(IsGeneratingWorld() || IsLocalCompany());
static int double_click_time = 0;
static Point double_click_pos = {0, 0};
@@ -2348,7 +2348,7 @@ void InputLoop()
{
/* World generation is multithreaded and messes with companies.
* But there is no company related window open anyway, so _current_company is not used. */
- assert(IsGeneratingWorld() || _local_company == _current_company);
+ assert(IsGeneratingWorld() || IsLocalCompany());
CheckSoftLimit();
HandleKeyScrolling();