Repository: xbmc/xbmc
File: xbmc/cores/VideoPlayer/DVDSubtitles/DVDSubtitlesLibass.cpp (C++)

Code before:
      style->OutlineColour = ConvColor(subStyle->fontBorderColor, subStyle->fontOpacity);
      if (subStyle->borderStyle == BorderType::OUTLINE_NO_SHADOW)
      {
        style->BackColour = ConvColor(COLOR::NONE, 0); // Set the shadow color
        style->Shadow = 0; // Set the shadow size
      }
      else
      {
        style->BackColour =
            ConvColor(subStyle->shadowColor, subStyle->shadowOpacity); // Set the shadow color
        style->Shadow = (10.00 / 100 * subStyle->shadowSize) * scale; // Set the shadow size
      }
    }
    else if (subStyle->borderStyle == BorderType::BOX)
    {
      // This BorderStyle not support outline color/size
      style->BorderStyle = ASS_BORDER_STYLE_BOX;
      style->Outline = 4 * scale; // Space between the text and the box edges
      style->OutlineColour =
          ConvColor(subStyle->backgroundColor,
                    subStyle->backgroundOpacity); // Set the background border color
      style->BackColour =
          ConvColor(subStyle->shadowColor, subStyle->shadowOpacity); // Set the box shadow color
      style->Shadow = (10.00 / 100 * subStyle->shadowSize) * scale; // Set the box shadow size
      // By default a box overlaps the other, then we increase a bit the line spacing
      lineSpacing = fmax(subStyle->lineSpacing, 8.0 * scaleDefault);
    }
    else if (subStyle->borderStyle == BorderType::SQUARE_BOX)
    {
      // This BorderStyle not support shadow color/size
      style->BorderStyle = ASS_BORDER_STYLE_SQUARE_BOX;
      style->Outline = (10.00 / 100 * subStyle->fontBorderSize) * scale;
      style->OutlineColour = ConvColor(subStyle->fontBorderColor, subStyle->fontOpacity);
      style->BackColour = ConvColor(subStyle->backgroundColor, subStyle->backgroundOpacity);
      style->Shadow = 4 * scale; // Space between the text and the box edges
    }

    // ass_set_line_spacing do not scale, so we have to scale to frame size
    ass_set_line_spacing(m_renderer,
                         lineSpacing / playResY * static_cast<double>(opts.frameHeight));

    style->Blur = (10.00 / 100 * subStyle->blur);

    // Set the margins (in pixel)
    if (opts.marginsMode == MarginsMode::DISABLED)
    {
      style->MarginL = 0;
      style->MarginR = 0;
      style->MarginV = 0;
    }
    else

Review comment (suggestion):
when you use c++ methods add namespace
```suggestion
      lineSpacing = std::fmax(subStyle->lineSpacing, 8.0 * scaleDefault);
```

Code after:
      if (subStyle->borderStyle == BorderType::OUTLINE_NO_SHADOW)
      {
        style->BackColour = ConvColor(COLOR::NONE, 0); // Set the shadow color
        style->Shadow = 0; // Set the shadow size
      }
      else
      {
        style->BackColour =
            ConvColor(subStyle->shadowColor, subStyle->shadowOpacity); // Set the shadow color
        style->Shadow = (10.00 / 100 * subStyle->shadowSize) * scale; // Set the shadow size
      }
    }
    else if (subStyle->borderStyle == BorderType::BOX)
    {
      // This BorderStyle not support outline color/size
      style->BorderStyle = ASS_BORDER_STYLE_BOX;
      style->Outline = 4 * scale; // Space between the text and the box edges
      style->OutlineColour =
          ConvColor(subStyle->backgroundColor,
                    subStyle->backgroundOpacity); // Set the background border color
      style->BackColour =
          ConvColor(subStyle->shadowColor, subStyle->shadowOpacity); // Set the box shadow color
      style->Shadow = (10.00 / 100 * subStyle->shadowSize) * scale; // Set the box shadow size
    }
    else if (subStyle->borderStyle == BorderType::SQUARE_BOX)
    {
      // This BorderStyle not support shadow color/size
      style->BorderStyle = ASS_BORDER_STYLE_SQUARE_BOX;
      style->Outline = (10.00 / 100 * subStyle->fontBorderSize) * scale;
      style->OutlineColour = ConvColor(subStyle->fontBorderColor, subStyle->fontOpacity);
      style->BackColour = ConvColor(subStyle->backgroundColor, subStyle->backgroundOpacity);
      style->Shadow = 4 * scale; // Space between the text and the box edges
    }

    double lineSpacing = (static_cast<double>(subStyle->lineSpacing) * (playResY / 4)) / 100;
    if (subStyle->assOverrideFont)
      lineSpacing *= scaleDefault;
    else
      lineSpacing *= scale;
    // ass_set_line_spacing do not scale, so we have to scale to frame size
    ass_set_line_spacing(m_renderer,
                         lineSpacing / playResY * static_cast<double>(opts.frameHeight / 4));

    style->Blur = (10.00 / 100 * subStyle->blur);

    // Set the margins (in pixel)
    if (opts.marginsMode == MarginsMode::DISABLED)
    {
      style->MarginL = 0;
      style->MarginR = 0;
      style->MarginV = 0;