[haiku-commits] Re: haiku: hrev44384 - src/kits/tracker

  • From: Axel Dörfler <axeld@xxxxxxxxxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Mon, 23 Jul 2012 12:06:38 +0200

On 23.07.2012 04:17, stpere@xxxxxxxxx wrote:
674ff0d: Tracker: Various sorting issues in Tracker

Great one! Those annoyed me already quite a bit :-)

Just pointing out some style issues:
@@ -5359,6 +5359,12 @@ BPoseView::EntryMoved(const BMessage *message)
  }


+struct attrColumnRelation {
+       uint32  attrHash;
+       int32   fieldMask;
+};

Please move structure declarations to the top of the file.
Style should be either this_is_a_structure or ThisIsAStructure, but not thisIsAStructure.

+                       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 }
+                       };

This could be moved to the top of the file, too. Plural from attribute is attributes (missing 'e').

+                               if (attributs[i].attrHash == PrimarySort()
+                                       || attributs[i].attrHash == 
SecondarySort()) {
+
+                                       if (fields & attributs[i].fieldMask) {

Extraneous blank line, please use (a & b) != 0 instead.

Bye,
   Axel.


Other related posts: