Bug 1931617 Part 2 - Remove mentions of Algorithm.h where it's no longer used r=emilio,application-update-reviewers,bytesized

Differential Revision: https://phabricator.services.mozilla.com/D229205
This commit is contained in:
longsonr 2024-11-19 11:25:39 +00:00
parent 479651da80
commit 757207363d
5 changed files with 10 additions and 11 deletions

View File

@ -1152,8 +1152,8 @@ Use the standard-library functions (``std::max``), instead of
Use ``mozilla::Abs`` instead of ``PR_ABS``. All ``PR_ABS`` calls in C++ code have
been replaced with ``mozilla::Abs`` calls, in `bug
847480 <https://bugzilla.mozilla.org/show_bug.cgi?id=847480>`__. All new
code in ``Firefox/core/toolkit`` needs to ``#include "nsAlgorithm.h"`` and
use the ``NS_foo`` variants instead of ``PR_foo``, or
code in ``Firefox/core/toolkit`` needs to use the ``NS_foo`` variants
instead of ``PR_foo``, or
``#include "mozilla/MathAlgorithms.h"`` for ``mozilla::Abs``.
Use of SpiderMonkey rooting typedefs

View File

@ -36,8 +36,8 @@ enum class LayoutFrameType : uint8_t;
* @return aValue clamped to [aMinValue, aMaxValue].
*
* @note This function needs to handle aMinValue > aMaxValue. In that case,
* aMinValue is returned. That's why we cannot use std::clamp() and
* mozilla::clamped() since they both assert max >= min.
* aMinValue is returned. That's why we cannot use std::clamp()
* since it asserts max >= min.
* @note If aMinValue and aMaxValue are computed min block-size and max
* block-size, it is simpler to use ReflowInput::ApplyMinMaxBSize().
* Similarly, there is ReflowInput::ApplyMinMaxISize() for clamping an

View File

@ -379,9 +379,6 @@ inline bool SameFragment(const nsScannerIterator& a,
return a.fragment().mFragmentStart == b.fragment().mFragmentStart;
}
/**
* this class is needed in order to make use of the methods in nsAlgorithm.h
*/
template <>
struct nsCharSourceTraits<nsScannerIterator> {
typedef nsScannerIterator::difference_type difference_type;

View File

@ -14,7 +14,6 @@
#include "archivereader.h"
#include "updatererrors.h"
#ifdef XP_WIN
# include "nsAlgorithm.h" // Needed by nsVersionComparator.cpp
# include "updatehelper.h"
#endif
#define XZ_USE_CRC64

View File

@ -11,9 +11,12 @@
#include <stdint.h>
#include <errno.h>
#include "mozilla/CheckedInt.h"
#if defined(XP_WIN) && !defined(UPDATER_NO_STRING_GLUE_STL)
# include <wchar.h>
# include "nsString.h"
#if defined(XP_WIN)
# if !defined(UPDATER_NO_STRING_GLUE_STL)
# include <wchar.h>
# include "nsString.h"
# endif
# include "nsAlgorithm.h"
#endif
struct VersionPart {