Opened 16 years ago
Closed 15 years ago
#287 closed defect (fixed)
Conversion function naming
Reported by: | rgrieder | Owned by: | nobody |
---|---|---|---|
Priority: | minor | Milestone: | Version 0.3 Codename: Castor |
Component: | GeneralFramework | Version: | 0.2.0 |
Keywords: | convert, conversion | Cc: | |
Referenced By: | References: |
Description
If you look at src/util/Convert.h you can see in the public section almost at the end of the file, that we have tons of different functions that do the same.
That is not such a big problem, most of the are very useful indeed. But the issues are:
- There is "convertValue" and "ConverValue", that's a bad idea
- I have chosen "omni_cast" to speed up writing short conversions. The name is quite bad and someone made a suggestion for a new name: "multi_cast". Is that more appropriate?
- Furthermore, getConvertedValue and omni_cast do the same. We could easily merge them. The difference is the order of the template parameters.
Change History (2)
comment:1 Changed 16 years ago by bknecht
- Milestone changed from Version 0.2 Codename: Bellatrix to Version 0.3 Codename: Castor
comment:2 Changed 15 years ago by rgrieder
- Resolution set to fixed
- Status changed from new to closed
Note: See
TracTickets for help on using
tickets.
Deleted the upper case versions and renamed omni_cast to multi_cast. Having both multi_cast and getConvertedValue shouldn't be a problem, esp. because getConvertedValue supports a fallback value.