summaryrefslogtreecommitdiff
path: root/src/company_func.h
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/company_func.h
parentb65a9eb85629006336e16db707bbc2a8a84c8593 (diff)
downloadopenttd-7aabb887d4b613d02addf5b705d15c5f2c329208.tar.xz
(svn r20269) -Codechange: Use IsLocalCompany() everywhere, document the function and two company globals.
Diffstat (limited to 'src/company_func.h')
-rw-r--r--src/company_func.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/company_func.h b/src/company_func.h
index 4b520ce7b..8dcdffbe8 100644
--- a/src/company_func.h
+++ b/src/company_func.h
@@ -27,6 +27,10 @@ extern CompanyByte _current_company;
extern Colours _company_colours[MAX_COMPANIES]; ///< NOSAVE: can be determined from company structs
extern CompanyManagerFace _company_manager_face; ///< for company manager face storage in openttd.cfg
+/**
+ * Is the current company the local company?
+ * @return \c true of the current company is the local company, \c false otherwise.
+ */
static inline bool IsLocalCompany()
{
return _local_company == _current_company;