-
-
Notifications
You must be signed in to change notification settings - Fork 16
Open
Description
During the review of #132 we discovered the API doc for some of the function is lacking the information about the sematic of returned nullptr value
Here are two examples, both on InflectableStringConcept
https://github.com/unicode-org/inflection/blob/main/inflection/src/inflection/dialog/InflectableStringConcept.hpp#L16
/**
* Returns the Speakable String representing the given semantic feature.
*
* @param feature - the semantic feature for which the value is requested.
* @return Speakable String
*/
SpeakableString* getFeatureValue(const SemanticFeature& feature) const override;
...
/**
* Converts the concept to a Speakable String
*
* @return Speakable String
*/
SpeakableString* toSpeakableString() const override;
/**
* Clones the concept
*
* @return concept
*/
InflectableStringConcept* clone() const override;
all these three may return nullptr or a valid pointer. We should document what the caller should do when it is not nullptr (to delete them to release memory) and what does that mean when the return value is nullptr (error condition or somethin else)
Metadata
Metadata
Assignees
Labels
No labels