Update to 1.10.0-beta1

This commit is contained in:
dP
2019-10-31 22:24:28 +03:00
parent b84a475e14
commit 599ccf0c2b
1470 changed files with 354219 additions and 16795 deletions

View File

@@ -60,9 +60,9 @@ static inline StringID MakeStringID(StringTab tab, uint index)
}
class StringParameters {
StringParameters *parent; ///< If not NULL, this instance references data from this parent instance.
StringParameters *parent; ///< If not nullptr, this instance references data from this parent instance.
uint64 *data; ///< Array with the actual data.
WChar *type; ///< Array with type information about the data. Can be NULL when no type information is needed. See #StringControlCode.
WChar *type; ///< Array with type information about the data. Can be nullptr when no type information is needed. See #StringControlCode.
public:
uint offset; ///< Current offset in the data/type arrays.
@@ -70,7 +70,7 @@ public:
/** Create a new StringParameters instance. */
StringParameters(uint64 *data, uint num_param, WChar *type) :
parent(NULL),
parent(nullptr),
data(data),
type(type),
offset(0),
@@ -80,9 +80,9 @@ public:
/** Create a new StringParameters instance. */
template <size_t Tnum_param>
StringParameters(int64 (&data)[Tnum_param]) :
parent(NULL),
parent(nullptr),
data((uint64 *)data),
type(NULL),
type(nullptr),
offset(0),
num_param(Tnum_param)
{
@@ -100,8 +100,8 @@ public:
num_param(size)
{
assert(size <= parent.GetDataLeft());
if (parent.type == NULL) {
this->type = NULL;
if (parent.type == nullptr) {
this->type = nullptr;
} else {
this->type = parent.type + parent.offset;
}
@@ -109,7 +109,7 @@ public:
~StringParameters()
{
if (this->parent != NULL) {
if (this->parent != nullptr) {
this->parent->offset += this->num_param;
}
}
@@ -148,7 +148,7 @@ public:
/** Does this instance store information about the type of the parameters. */
bool HasTypeInformation() const
{
return this->type != NULL;
return this->type != nullptr;
}
/** Get the type of a specific element. */
@@ -238,7 +238,7 @@ extern TextDirection _current_text_dir; ///< Text direction of the currently sel
void InitializeLanguagePacks();
const char *GetCurrentLanguageIsoCode();
int CDECL StringIDSorter(const StringID *a, const StringID *b);
bool StringIDSorter(const StringID &a, const StringID &b);
/**
* A searcher for missing glyphs.
@@ -250,7 +250,7 @@ public:
/**
* Get the next string to search through.
* @return The next string or NULL if there is none.
* @return The next string or nullptr if there is none.
*/
virtual const char *NextString() = 0;
@@ -275,12 +275,13 @@ public:
* Set the right font names.
* @param settings The settings to modify.
* @param font_name The new font name.
* @param os_data Opaque pointer to OS-specific data.
*/
virtual void SetFontNames(struct FreeTypeSettings *settings, const char *font_name) = 0;
virtual void SetFontNames(struct FreeTypeSettings *settings, const char *font_name, const void *os_data = nullptr) = 0;
bool FindMissingGlyphs(const char **str);
};
void CheckForMissingGlyphs(bool base_font = true, MissingGlyphSearcher *search = NULL);
void CheckForMissingGlyphs(bool base_font = true, MissingGlyphSearcher *search = nullptr);
#endif /* STRINGS_FUNC_H */