Viewing Issue Simple Details Jump to Notes ] Wiki ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0007067 [DCSS] Patches trivial always 2013-05-21 04:00 2013-07-25 11:49
Reporter chris View Status public  
Assigned To neil
Priority normal Resolution done  
Status closed   Product Branch 0.13 ancient branch
Summary 0007067: Whitespace fixes
Description
From 5bfd1263e95b3233fc65dfc9c52a917c965f7e5c Mon Sep 17 00:00:00 2001
From: Chris Oelmueller <chris.oelmueller@gmail.com>
Date: Tue, 21 May 2013 03:49:21 +0200
Subject: Whitespace fixes

---
 crawl-ref/source/menu.cc | 14 +++++++-------
 crawl-ref/source/menu.h  | 14 +++++++-------
 2 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/crawl-ref/source/menu.cc b/crawl-ref/source/menu.cc
index 3f88fc1..defdb1b 100644
--- a/crawl-ref/source/menu.cc
+++ b/crawl-ref/source/menu.cc
@@ -599,8 +599,8 @@ bool Menu::process_key(int keyin)
         {
             if (num > 999)
                 num = -1;
-            num = (num == -1)? keyin - '0' :
-                               num * 10 + keyin - '0';
+            num = (num == -1) ? keyin - '0' :
+                                num * 10 + keyin - '0';
         }
 
         select_items(keyin, num);
@@ -725,7 +725,7 @@ string Menu::get_select_count_string(int count) const
         if (count)
         {
             snprintf(buf, sizeof buf, "  (%d item%s)  ", count,
-                    (count > 1? "s" : ""));
+                    (count > 1 ? "s" : ""));
         }
         return string(buf);
     }
@@ -804,7 +804,7 @@ void Menu::select_items(int key, int qty)
 
         // We have to use some hackery to handle items that share
         // the same hotkey (as for pickup when there's a stack of
-        // >52 items).  If there are duplicate hotkeys, the items
+        // >52 items). If there are duplicate hotkeys, the items
         // are usually separated by at least a page, so we should
         // only select the item on the current page. This is why we
         // use two loops, and check to see if we've matched an item
@@ -1181,7 +1181,7 @@ void Menu::select_item_index(int idx, int qty, bool draw_cursor)
 
 void Menu::select_index(int index, int qty)
 {
-    int si = index == -1? first_entry : index;
+    int si = index == -1 ? first_entry : index;
 
     if (index == -1)
     {
@@ -1277,7 +1277,7 @@ int Menu::item_colour(int, const MenuEntry *entry) const
     if (highlighter)
         icol = highlighter->entry_colour(entry);
 
-    return (icol == -1? entry->colour : icol);
+    return (icol == -1 ? entry->colour : icol);
 }
 
 void Menu::draw_title()
@@ -1723,7 +1723,7 @@ void column_composer::add_formatted(int ncol,
 
     compose_formatted_column(newlines,
                               col.lines,
-                              margin == -1? col.margin : margin);
+                              margin == -1 ? col.margin : margin);
 
     col.lines += newlines.size();
 
diff --git a/crawl-ref/source/menu.h b/crawl-ref/source/menu.h
index 30918f5..b8e4a5d 100644
--- a/crawl-ref/source/menu.h
+++ b/crawl-ref/source/menu.h
@@ -177,7 +177,7 @@ public:
         else if (selected())
             selected_qty = 0;
         else if (quantity)
-            selected_qty = (qty == -1? quantity : qty);
+            selected_qty = (qty == -1 ? quantity : qty);
     }
 
     virtual string get_filter_text() const
@@ -198,10 +198,10 @@ public:
     string alt_text;
 
     ToggleableMenuEntry(const string &txt = string(),
-                         const string &alt_txt = string(),
-                         MenuEntryLevel lev = MEL_ITEM,
-                         int qty = 0, int hotk = 0,
-                         bool preselect = false) :
+                        const string &alt_txt = string(),
+                        MenuEntryLevel lev = MEL_ITEM,
+                        int qty = 0, int hotk = 0,
+                        bool preselect = false) :
         MenuEntry(txt, lev, qty, hotk, preselect), alt_text(alt_txt) {}
 
     void toggle() { text.swap(alt_text); }
@@ -587,7 +587,7 @@ public:
 
     virtual void set_bounds(const coord_def& min_coord, const coord_def& max_coord);
     virtual void set_bounds_no_multiply(const coord_def& min_coord,
-                                         const coord_def& max_coord);
+                                        const coord_def& max_coord);
     virtual void move(const coord_def& delta);
     virtual const coord_def& get_min_coord() const { return m_min_coord; }
     virtual const coord_def& get_max_coord() const { return m_max_coord; }
@@ -670,7 +670,7 @@ public:
 
     virtual void set_bounds(const coord_def& min_coord, const coord_def& max_coord);
     virtual void set_bounds_no_multiply(const coord_def& min_coord,
-                                         const coord_def& max_coord);
+                                        const coord_def& max_coord);
 
     virtual void render();
 
-- 
1.8.2.3

Additional Information
Tags No tags attached.
Attached Files

- Relationships

-  Notes
(0022729)
neil (administrator)
2013-05-21 08:27

Applied in trunk (0.13-a0-825-g4d033e7), thanks!

- Issue History
Date Modified Username Field Change
2013-05-21 04:00 chris New Issue
2013-05-21 08:27 neil Note Added: 0022729
2013-05-21 08:27 neil Status new => resolved
2013-05-21 08:27 neil Fixed in Branch => 0.13 development branch
2013-05-21 08:27 neil Resolution open => done
2013-05-21 08:27 neil Assigned To => neil
2013-07-25 11:49 chris Status resolved => closed


Mantis 1.1.8[^]
Copyright © 2000 - 2009 Mantis Group
Powered by Mantis Bugtracker