Opened 5 years ago
#16089 new task
HaikuDepot: Model Lock Method Name is Confusing
Reported by: | apl-haiku | Owned by: | apl-haiku |
---|---|---|---|
Priority: | normal | Milestone: | Unscheduled |
Component: | Applications/HaikuDepot | Version: | R1/Development |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Platform: | All |
Description
(c.f. Adrien on a peer-review https://review.haiku-os.org/c/haiku/+/2748 review])
| it would be a good idea to rename Lock() to GetLock() because this | is a bit confusing. Also it should return a reference rather than | a pointer since you're not doing a NULL check here.
This is true, the method name "Lock" on the "Model" class is quite confusing because it is hard to know if it means the verb or the noun. Also check to make sure it can never be NULL and look at calling patterns around locks elsewhere.
Note:
See TracTickets
for help on using tickets.