docs: add missing \a commands for arguments

This commit is contained in:
Simon Hausmann 2021-06-24 16:43:36 +02:00
parent 376ed43544
commit d9857a3308
2 changed files with 7 additions and 10 deletions

View file

@ -136,15 +136,15 @@ public:
inline Color brighter(float factor) const; inline Color brighter(float factor) const;
inline Color darker(float factor) const; inline Color darker(float factor) const;
/// Returns true if \a lhs has the same values for the individual color channels as \rhs; false /// Returns true if \a lhs has the same values for the individual color channels as \a rhs;
/// otherwise. /// false otherwise.
friend bool operator==(const Color &lhs, const Color &rhs) friend bool operator==(const Color &lhs, const Color &rhs)
{ {
return lhs.inner.red == rhs.inner.red && lhs.inner.green == rhs.inner.green return lhs.inner.red == rhs.inner.red && lhs.inner.green == rhs.inner.green
&& lhs.inner.blue == rhs.inner.blue && lhs.inner.alpha == rhs.inner.alpha; && lhs.inner.blue == rhs.inner.blue && lhs.inner.alpha == rhs.inner.alpha;
} }
/// Returns true if \a lhs has any different values for the individual color channels as \rhs; /// Returns true if \a lhs has any different values for the individual color channels as \a rhs;
/// false otherwise. /// false otherwise.
friend bool operator!=(const Color &lhs, const Color &rhs) { return !(lhs == rhs); } friend bool operator!=(const Color &lhs, const Color &rhs) { return !(lhs == rhs); }

View file

@ -54,7 +54,7 @@ struct SharedString
cbindgen_private::sixtyfps_shared_string_clone(this, &other); cbindgen_private::sixtyfps_shared_string_clone(this, &other);
return *this; return *this;
} }
/// Assigns the string view \s to this string and returns a reference to this string. /// Assigns the string view \a s to this string and returns a reference to this string.
/// The underlying string data is copied. It is assumed that the string is UTF-8 encoded. /// The underlying string data is copied. It is assumed that the string is UTF-8 encoded.
SharedString &operator=(std::string_view s) SharedString &operator=(std::string_view s)
{ {
@ -65,10 +65,7 @@ struct SharedString
/// Assigns null-terminated string pointer \a s to this string and returns a reference /// Assigns null-terminated string pointer \a s to this string and returns a reference
/// to this string. The underlying string data is copied. It is assumed that the string /// to this string. The underlying string data is copied. It is assumed that the string
/// is UTF-8 encoded. /// is UTF-8 encoded.
SharedString &operator=(const char *s) SharedString &operator=(const char *s) { return *this = std::string_view(s); }
{
return *this = std::string_view(s);
}
/// Move-assigns \a other to this SharedString instance. /// Move-assigns \a other to this SharedString instance.
SharedString &operator=(SharedString &&other) SharedString &operator=(SharedString &&other)
@ -123,12 +120,12 @@ struct SharedString
/// \endcode /// \endcode
static SharedString from_number(double n) { return SharedString(n); } static SharedString from_number(double n) { return SharedString(n); }
/// Returns true if \a is equal to \b; otherwise returns false. /// Returns true if \a a is equal to \a b; otherwise returns false.
friend bool operator==(const SharedString &a, const SharedString &b) friend bool operator==(const SharedString &a, const SharedString &b)
{ {
return std::string_view(a) == std::string_view(b); return std::string_view(a) == std::string_view(b);
} }
/// Returns true if \a is not equal to \b; otherwise returns false. /// Returns true if \a a is not equal to \a b; otherwise returns false.
friend bool operator!=(const SharedString &a, const SharedString &b) friend bool operator!=(const SharedString &a, const SharedString &b)
{ {
return std::string_view(a) != std::string_view(b); return std::string_view(a) != std::string_view(b);