diff options
author | Raphael Langella <raphael.langella@gmail.com> | 2012-08-26 22:50:06 +0200 |
---|---|---|
committer | Raphael Langella <raphael.langella@gmail.com> | 2012-08-26 23:06:30 +0200 |
commit | 770bcbd1844b97b671d0e47ea8313cdf2c74c5ea (patch) | |
tree | e030cf61afce9ca69b74bb38eb73734bf10f633e /crawl-ref/source/tilereg-tab.cc | |
parent | a6c16c7f2066c854a01f25e9e6c3d8e44282a638 (diff) | |
download | crawl-ref-770bcbd1844b97b671d0e47ea8313cdf2c74c5ea.tar.gz crawl-ref-770bcbd1844b97b671d0e47ea8313cdf2c74c5ea.zip |
Use std namespace.
I had to rename distance() (in coord.h) to distance2() because it conflicts
with the STL function to compare 2 iterators. Not a bad change given how it
returns the square of the distance anyway.
I also had to rename the message global variable (in message.cc) to buffer.
I tried to fix and improve the coding style has much as I could, but I
probably missed a few given how huge and tedious it is.
I also didn't touch crawl-gdb.py, and the stuff in prebuilt, rltiles/tool
and util/levcomp.*, because I have no clue about those.
Diffstat (limited to 'crawl-ref/source/tilereg-tab.cc')
-rw-r--r-- | crawl-ref/source/tilereg-tab.cc | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/crawl-ref/source/tilereg-tab.cc b/crawl-ref/source/tilereg-tab.cc index 1c074ce45f..f840a3406d 100644 --- a/crawl-ref/source/tilereg-tab.cc +++ b/crawl-ref/source/tilereg-tab.cc @@ -33,7 +33,7 @@ void TabbedRegion::set_icon_pos(int idx) { if (i == idx || !m_tabs[i].reg) continue; - start_y = std::max(m_tabs[i].max_y + 1, start_y); + start_y = max(m_tabs[i].max_y + 1, start_y); } m_tabs[idx].min_y = start_y; m_tabs[idx].max_y = start_y + m_tabs[idx].height; @@ -70,7 +70,7 @@ void TabbedRegion::set_tab_region(int idx, GridRegion *reg, tileidx_t tile_tab) } const tile_info &inf = tile_gui_info(tile_tab); - ox = std::max((int)inf.width, ox); + ox = max((int)inf.width, ox); // All tabs should be the same size. for (int i = 1; i < TAB_OFS_MAX; ++i) @@ -321,12 +321,12 @@ int TabbedRegion::handle_mouse(MouseEvent &event) return (get_tab_region(active_tab())->handle_mouse(event)); } -bool TabbedRegion::update_tab_tip_text(std::string &tip, bool active) +bool TabbedRegion::update_tab_tip_text(string &tip, bool active) { return false; } -bool TabbedRegion::update_tip_text(std::string &tip) +bool TabbedRegion::update_tip_text(string &tip) { if (!active_is_valid()) return false; @@ -341,7 +341,7 @@ bool TabbedRegion::update_tip_text(std::string &tip) return (get_tab_region(active_tab())->update_tip_text(tip)); } -bool TabbedRegion::update_alt_text(std::string &alt) +bool TabbedRegion::update_alt_text(string &alt) { if (!active_is_valid()) return false; @@ -349,13 +349,13 @@ bool TabbedRegion::update_alt_text(std::string &alt) return (get_tab_region(active_tab())->update_alt_text(alt)); } -int TabbedRegion::find_tab(std::string tab_name) const +int TabbedRegion::find_tab(string tab_name) const { lowercase(tab_name); - std::string pluralised_name = pluralise(tab_name); + string pluralised_name = pluralise(tab_name); for (int i = 0, size = m_tabs.size(); i < size; ++i) { - std::string reg_name = lowercase_string(m_tabs[i].reg->name()); + string reg_name = lowercase_string(m_tabs[i].reg->name()); if (tab_name == reg_name || pluralised_name == reg_name) return i; } |