Actions

EmSys

CCoding Style - Be consistent

From EdWiki

Revision as of 09:30, 23 June 2015 by Jshankar (Talk | contribs) (1 revision imported: EdWiki -- Emsys pages from Shukra)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Be consistent

struct UserQueue {
    int noOfItemsInQ;
    int frontOfTheQueue;
    int queueCapacity;
    int noOfUsersInQueue;
}queue;
queue.queueCapacity
  • Queue is redundant
struct UserQueue {
    int nitem;
    int front;
    int capacity;
    int nusers;
}queue;
queue.capacity
  • No clarity is lost