Decouple <cstddef>

This commit is contained in:
Martin Natano
2023-04-20 11:21:29 +02:00
parent 093675cdc3
commit 78fb2e9fc3
171 changed files with 2012 additions and 1786 deletions
+13 -11
View File
@@ -6,6 +6,8 @@
#include "RageTextureID.h"
#include "RageUtil.h"
#include "RageTypes.h"
#include <cstddef>
#include <map>
class FontPage;
@@ -57,7 +59,7 @@ struct glyph
/** @brief Texture coordinate rect. */
RectF m_TexRect;
/** @brief Set up the glyph with default values. */
glyph() : m_pPage(nullptr), m_FontPageTextures(), m_iHadvance(0),
m_fWidth(0), m_fHeight(0), m_fHshift(0), m_TexRect() {}
@@ -86,7 +88,7 @@ struct FontPageSettings
/** @brief The initial settings for the FontPage. */
FontPageSettings(): m_sTexturePath(""),
m_iDrawExtraPixelsLeft(0), m_iDrawExtraPixelsRight(0),
m_iAddToAllWidths(0),
m_iAddToAllWidths(0),
m_iLineSpacing(-1),
m_iTop(-1),
m_iBaseline(-1),
@@ -154,7 +156,7 @@ public:
int GetLineWidthInSourcePixels( const std::wstring &szLine ) const;
int GetLineHeightInSourcePixels( const std::wstring &szLine ) const;
size_t GetGlyphsThatFit(const std::wstring& line, int* width) const;
std::size_t GetGlyphsThatFit(const std::wstring& line, int* width) const;
bool FontCompleteForString( const std::wstring &str ) const;
@@ -192,8 +194,8 @@ private:
/**
* @brief This is the primary fontpage of this font.
*
* The font-wide height, center, etc. is pulled from it.
*
* The font-wide height, center, etc. is pulled from it.
* (This is one of pages[].) */
FontPage *m_pDefault;
@@ -205,10 +207,10 @@ private:
/**
* @brief True for Hebrew, Arabic, Urdu fonts.
*
* This will also change the way glyphs from the default FontPage are rendered.
* This will also change the way glyphs from the default FontPage are rendered.
* There may be a better way to handle this. */
bool m_bRightToLeft;
bool m_bDistanceField;
RageColor m_DefaultStrokeColor;
@@ -219,14 +221,14 @@ private:
void LoadFontPageSettings( FontPageSettings &cfg, IniFile &ini, const RString &sTexturePath, const RString &PageName, RString sChars );
static void GetFontPaths( const RString &sFontOrTextureFilePath, std::vector<RString> &sTexturePaths );
RString GetPageNameFromFileName( const RString &sFilename );
Font(const Font& rhs);
Font& operator=(const Font& rhs);
};
/**
* @brief Last private-use Unicode character:
*
*
* This is in the header to reduce file dependencies. */
const wchar_t FONT_DEFAULT_GLYPH = 0xF8FF;
@@ -236,7 +238,7 @@ const wchar_t FONT_DEFAULT_GLYPH = 0xF8FF;
* @file
* @author Glenn Maynard, Chris Danford (c) 2001-2004
* All rights reserved.
*
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -246,7 +248,7 @@ const wchar_t FONT_DEFAULT_GLYPH = 0xF8FF;
* copyright notice(s) and this permission notice appear in all copies of
* the Software and that both the above copyright notice(s) and this
* permission notice appear in supporting documentation.
*
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF