fixes after first reviews

This commit is contained in:
Laurent Rineau 2025-10-29 16:19:58 +01:00
parent 7c4a3c1dad
commit 73b8e65b5a
2 changed files with 20 additions and 20 deletions

View File

@ -265,25 +265,25 @@ public:
}
}
/** \brief Get the current color code string. */
/** \brief gets the current color code string. */
const string& color_code() const { return color_code_; }
/**
* \brief Set a new color code.
* \brief sets a new color code.
*
* \param string The new color code to apply
* \param color_code The new color code to apply
*/
void set_color_code(const string& color_code) {
color_code_ = color_code;
}
/** \brief Check if colors are enabled for this streambuf. */
/** \brief checks if colors are enabled for this streambuf. */
bool colors_enabled() const { return colors_enabled_; }
/** \brief Get the wrapped streambuf. */
/** \brief gets the wrapped streambuf. */
streambuf_type& wrapped_streambuf() const { return *wrapped_buf_; }
/** \brief Detect if the wrapped buffer supports color output. */
/** \brief detects if the wrapped buffer supports color output. */
static bool detect_color_support(streambuf_type* buf) {
if(safe_getenv("NO_COLOR").value_or("").size() > 0) {
return false;
@ -457,7 +457,7 @@ private:
public:
/**
* \brief Construct and install a color streambuf on the given stream.
* \brief constructs and installs a color streambuf on the given stream.
*
* \param stream The stream to modify
* \param color The color to apply to the output
@ -477,7 +477,7 @@ public:
}
/**
* \brief Construct and install a color streambuf with multiple colors.
* \brief constructs and installs a color streambuf with multiple colors.
*
* \param stream The stream to modify
* \param colors Vector of colors to combine (e.g., bold + red)
@ -535,7 +535,7 @@ using Color_wstream_guard = Basic_color_stream_guard<std::wostream>;
/**
* \ingroup PkgStreamSupportRef
*
* \brief Create color guards for multiple streams simultaneously.
* \brief creates color guards for multiple streams simultaneously.
*
* This helper function creates `Basic_color_stream_guard` objects for
* multiple streams at once. All streams will use the same color settings,
@ -562,7 +562,7 @@ auto make_color_guards(Ansi_color color, Streams&... streams) {
/**
* \ingroup PkgStreamSupportRef
*
* \brief Create color guards for multiple streams with multiple colors.
* \brief creates color guards for multiple streams with multiple colors.
*
* This overload allows specifying multiple colors to combine (e.g., bold + red).
*
@ -579,7 +579,7 @@ auto make_color_guards(const std::vector<Ansi_color>& colors, Streams&... stream
/**
* \ingroup PkgStreamSupportRef
*
* \brief Check if a stream is attached to a terminal that supports colors.
* \brief checks if a stream is attached to a terminal that supports colors.
*
* This function checks if the given output stream is connected to a terminal
* (TTY) that can display ANSI color codes. It performs the following checks:

View File

@ -56,7 +56,7 @@ private:
public:
/**
* \brief Construct an indenting streambuf wrapper.
* \brief constructs an indenting streambuf wrapper.
*
* \param wrapped_buf The underlying streambuf to wrap
* \param indent_string The string to use for indentation (default: 2 spaces)
@ -70,18 +70,18 @@ public:
{
}
/** \brief Get the current indentation string. */
/** \brief gets the current indentation string. */
const string& indent_string() const { return indent_string_; }
/**
* \brief Set a new indentation string.
* \brief sets a new indentation string.
*
* \param new_indent The new indentation string
*/
void set_indent_string(const string& new_indent) { indent_string_ = new_indent; }
/**
* \brief Set indentation level using repeated spaces.
* \brief sets indentation level using repeated spaces.
*
* \param level Number of indentation levels
* \param spaces_per_level Number of spaces per level (default: 2)
@ -90,7 +90,7 @@ public:
indent_string_ = string(level * spaces_per_level, char_type(' '));
}
/** \brief Get the wrapped streambuf. */
/** \brief gets the wrapped streambuf. */
streambuf_type& wrapped_streambuf() const { return *wrapped_buf_; }
protected:
@ -212,7 +212,7 @@ private:
public:
/**
* \brief Construct and install an indenting streambuf on the given stream.
* \brief constructs and installs an indenting streambuf on the given stream.
*
* \param stream The stream to modify
* \param indent_string The indentation string to use
@ -232,7 +232,7 @@ public:
}
/**
* \brief Construct and install an indenting streambuf on the given stream
* \brief constructs and installs an indenting streambuf on the given stream
*
* \param stream The stream to modify
* \param spaces_per_level Number of indentation spaces
@ -282,7 +282,7 @@ using Indenting_wstream_guard = Basic_indenting_stream_guard<std::wostream>;
/**
* \ingroup PkgStreamSupportRef
*
* \brief Create indenting guards for multiple streams simultaneously.
* \brief creates indenting guards for multiple streams simultaneously.
*
* This helper function creates `Basic_indenting_stream_guard` objects for
* multiple streams at once. All streams will use the same indentation settings,
@ -309,7 +309,7 @@ auto make_indenting_guards(int spaces_per_level, Streams&... streams) {
/**
* \ingroup PkgStreamSupportRef
*
* \brief Create indenting guards for multiple streams with a custom indent string.
* \brief creates indenting guards for multiple streams with a custom indent string.
*
* This overload allows specifying a custom indentation string instead of a number
* of spaces.