[haiku-commits] haiku: hrev44385 - src/kits/tracker

  • From: stpere@xxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Mon, 23 Jul 2012 15:13:29 +0200 (CEST)

hrev44385 adds 1 changeset to branch 'master'
old head: 674ff0df2f2eb00cbc78b4384fcf5b148a2139ff
new head: 516cac7817d0b2f54e8b59acfff5cf803ef7d2ab

----------------------------------------------------------------------------

516cac7: Tracker: Coding style violations fixes and typos
  
  No functional changes, thanks Axel!

                                [ Philippe Saint-Pierre <stpere@xxxxxxxxx> ]

----------------------------------------------------------------------------

Revision:    hrev44385
Commit:      516cac7817d0b2f54e8b59acfff5cf803ef7d2ab
URL:         http://cgit.haiku-os.org/haiku/commit/?id=516cac7
Author:      Philippe Saint-Pierre <stpere@xxxxxxxxx>
Date:        Mon Jul 23 12:21:43 2012 UTC

----------------------------------------------------------------------------

1 file changed, 22 insertions(+), 22 deletions(-)
src/kits/tracker/PoseView.cpp |   44 ++++++++++++++++++-------------------

----------------------------------------------------------------------------

diff --git a/src/kits/tracker/PoseView.cpp b/src/kits/tracker/PoseView.cpp
index 0a69b0e..592c04b 100644
--- a/src/kits/tracker/PoseView.cpp
+++ b/src/kits/tracker/PoseView.cpp
@@ -149,6 +149,24 @@ const BPoint kTransparentDragThreshold(256, 192);
        // if larger in any direction
 
 
+struct attr_column_relation {
+       uint32  attrHash;
+       int32   fieldMask;
+};
+
+
+static struct attr_column_relation attributes[] = {
+       { AttrHashString(kAttrStatModified, B_TIME_TYPE),
+               B_STAT_MODIFICATION_TIME },
+       { AttrHashString(kAttrStatSize, B_OFF_T_TYPE),
+               B_STAT_SIZE },
+       { AttrHashString(kAttrStatCreated, B_TIME_TYPE),
+               B_STAT_CREATION_TIME },
+       { AttrHashString(kAttrStatMode, B_STRING_TYPE),
+               B_STAT_MODE }
+};
+
+
 struct AddPosesResult {
        ~AddPosesResult();
        void ReleaseModels();
@@ -5359,12 +5377,6 @@ BPoseView::EntryMoved(const BMessage *message)
 }
 
 
-struct attrColumnRelation {
-       uint32  attrHash;
-       int32   fieldMask;
-};
-
-
 bool
 BPoseView::AttributeChanged(const BMessage *message)
 {
@@ -5454,23 +5466,11 @@ BPoseView::AttributeChanged(const BMessage *message)
                        if (message->FindInt32("fields", &fields) != B_OK)
                                return true;
 
-                       static struct attrColumnRelation attributs[] = {
-                               { AttrHashString(kAttrStatModified, 
B_TIME_TYPE),
-                                       B_STAT_MODIFICATION_TIME },
-                               { AttrHashString(kAttrStatSize, B_OFF_T_TYPE),
-                                       B_STAT_SIZE },
-                               { AttrHashString(kAttrStatCreated, B_TIME_TYPE),
-                                       B_STAT_CREATION_TIME },
-                               { AttrHashString(kAttrStatMode, B_STRING_TYPE),
-                                       B_STAT_MODE }
-                       };
-
-                       for (int32 i = sizeof(attributs) / 
sizeof(attrColumnRelation);
+                       for (int32 i = sizeof(attributes) / 
sizeof(attr_column_relation);
                                i--;) {
-                               if (attributs[i].attrHash == PrimarySort()
-                                       || attributs[i].attrHash == 
SecondarySort()) {
-
-                                       if (fields & attributs[i].fieldMask) {
+                               if (attributes[i].attrHash == PrimarySort()
+                                       || attributes[i].attrHash == 
SecondarySort()) {
+                                       if ((fields & attributes[i].fieldMask) 
!= 0) {
                                                _CheckPoseSortOrder(fPoseList, 
pose, poseListIndex);
                                                if (fFiltering && visible)
                                                        
_CheckPoseSortOrder(fFilteredPoseList, pose, index);


Other related posts: