Fix typos and en_US/en_GB inconsistency in various files (#12902)

This commit is contained in:
Abdou-31 2022-11-09 17:57:19 +01:00 committed by GitHub
parent 6191bafcad
commit d1b80b462e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
84 changed files with 134 additions and 134 deletions

View File

@ -138,7 +138,7 @@ These notes are for those who have push access Minetest (core developers / maint
If a Pull Request is not a bug fix:
* If it matches a goal in [the roadmap](../doc/direction.md), then the PR should
be labelled as "Roadmap" and the goal stated by number in the description.
be labeled as "Roadmap" and the goal stated by number in the description.
* If it doesn't match a goal, then it needs to receive a concept approval within
a week of being opened to remain open. This 1 week deadline does not apply to
PRs opened before the roadmap was adopted; instead, they may remain open or be

View File

@ -334,7 +334,7 @@ cpack_add_component_group(Subgames
)
if(WIN32)
# Include all dynamically linked runtime libaries such as MSVCRxxx.dll
# Include all dynamically linked runtime libraries such as MSVCRxxx.dll
include(InstallRequiredSystemLibraries)
if(RUN_IN_PLACE)

View File

@ -20,8 +20,8 @@
-- TODO code cleanup --
-- Generic implementation of a filter/sortable list --
-- Usage: --
-- Filterlist needs to be initialized on creation. To achieve this you need to --
-- pass following functions: --
-- Filterlist needs to be initialized on creation. To achieve this you need --
-- to pass following functions: --
-- raw_fct() (mandatory): --
-- function returning a table containing the elements to be filtered --
-- compare_fct(element1,element2) (mandatory): --
@ -31,7 +31,7 @@
-- filter_fct(element,filtercriteria) (optional) --
-- function returning true/false if filtercriteria met to element --
-- fetch_param (optional) --
-- parameter passed to raw_fct to aquire correct raw data --
-- parameter passed to raw_fct to acquire correct raw data --
-- --
--------------------------------------------------------------------------------
filterlist = {}

View File

@ -8,7 +8,7 @@ local next, rawget, pairs, pcall, error, type, setfenv, loadstring
local table_concat, string_dump, string_format, string_match, math_huge
= table.concat, string.dump, string.format, string.match, math.huge
-- Recursively counts occurences of objects (non-primitives including strings) in a table.
-- Recursively counts occurrences of objects (non-primitives including strings) in a table.
local function count_objects(value)
local counts = {}
if value == nil then

View File

@ -10,7 +10,7 @@ end
local meta = {}
local declared = {}
-- Key is source file, line, and variable name; seperated by NULs
-- Key is source file, line, and variable name; separated by NULs
local warned = {}
function meta:__newindex(name, value)

View File

@ -81,7 +81,7 @@ metatable.__eq = vector.equals
function vector.length(v)
return math.sqrt(v.x * v.x + v.y * v.y + v.z * v.z)
end
-- Note: we can not use __len because it is already used for primitive table length
-- Note: we cannot use __len because it is already used for primitive table length
function vector.normalize(v)
local len = vector.length(v)
@ -356,7 +356,7 @@ function vector.dir_to_rotation(forward, up)
-- Since vector.angle never returns a negative value or a value greater
-- than math.pi, rot.z has to be inverted sometimes.
-- To determine wether this is the case, we rotate the up vector back around
-- To determine whether this is the case, we rotate the up vector back around
-- the forward vector and check if it worked out.
local back = vector.rotate_around_axis(up, forward, -rot.z)

View File

@ -243,7 +243,7 @@ function core.item_place_node(itemstack, placer, pointed_thing, param2,
if core.get_item_group(def.name, "attached_node") ~= 0 and
not builtin_shared.check_attached_node(place_to, newnode) then
log("action", "attached node " .. def.name ..
" can not be placed at " .. core.pos_to_string(place_to))
" cannot be placed at " .. core.pos_to_string(place_to))
return itemstack, nil
end

View File

@ -103,7 +103,7 @@ core.register_entity(":__builtin:item", {
try_merge_with = function(self, own_stack, object, entity)
if self.age == entity.age then
-- Can not merge with itself
-- Cannot merge with itself
return false
end
@ -113,7 +113,7 @@ core.register_entity(":__builtin:item", {
own_stack:get_meta() ~= stack:get_meta() or
own_stack:get_wear() ~= stack:get_wear() or
own_stack:get_free_space() == 0 then
-- Can not merge different or full stack
-- Cannot merge different or full stack
return false
end

View File

@ -1,4 +1,4 @@
-- can be overriden by mods
-- can be overridden by mods
function core.calculate_knockback(player, hitter, time_from_last_punch, tool_capabilities, dir, distance, damage)
if damage == 0 or player:get_armor_groups().immortal then
return 0.0

View File

@ -121,7 +121,7 @@ function core.get_player_radius_area(player_name, radius)
end
-- To be overriden by protection mods
-- To be overridden by protection mods
function core.is_protected(pos, name)
return false

View File

@ -278,7 +278,7 @@ local function resolve_dependencies_2(raw_deps, installed_mods, out)
end
end
-- Otherwise, find the first mod that fulfils it
-- Otherwise, find the first mod that fulfills it
if fallback then
return {
is_optional = dep.is_optional,

View File

@ -994,7 +994,7 @@ mgv7_floatland_ymax (Floatland maximum Y) int 4096 -31000 31000
# Must be less than or equal to half the distance between the Y limits.
mgv7_floatland_taper (Floatland tapering distance) int 256 0 32767
# Exponent of the floatland tapering. Alters the tapering behaviour.
# Exponent of the floatland tapering. Alters the tapering behavior.
# Value = 1.0 creates a uniform, linear tapering.
# Values > 1.0 create a smooth tapering suitable for the default separated
# floatlands.

View File

@ -18,7 +18,7 @@ varying vec3 worldPosition;
varying lowp vec4 varColor;
// The centroid keyword ensures that after interpolation the texture coordinates
// lie within the same bounds when MSAA is en- and disabled.
// This fixes the stripes problem with nearest-neighbour textures and MSAA.
// This fixes the stripes problem with nearest-neighbor textures and MSAA.
#ifdef GL_ES
varying mediump vec2 varTexCoord;
#else

View File

@ -1691,7 +1691,7 @@ Amount and wear
---------------
All item stacks have an amount between 0 and 65535. It is 1 by
default. Tool item stacks can not have an amount greater than 1.
default. Tool item stacks cannot have an amount greater than 1.
Tools use a wear (damage) value ranging from 0 to 65535. The
value 0 is the default and is used for unworn tools. The values
@ -3546,10 +3546,10 @@ Operators can be used if all of the involved vectors have metatables:
* Returns the additive inverse of v.
* `v1 + v2`:
* Returns the sum of both vectors.
* Note: `+` can not be used together with scalars.
* Note: `+` cannot be used together with scalars.
* `v1 - v2`:
* Returns the difference of `v1` subtracted by `v2`.
* Note: `-` can not be used together with scalars.
* Note: `-` cannot be used together with scalars.
* `v * s` or `s * v`:
* Returns `v` scaled by `s`.
* `v / s`:
@ -3650,7 +3650,7 @@ Helper functions
* Example: `minetest.string_to_area("(1,2,3) (~5,~-5,~)", {x=10,y=10,z=10})`
returns `{x=1,y=2,z=3}, {x=15,y=5,z=10}`
* `minetest.formspec_escape(string)`: returns a string
* escapes the characters "[", "]", "\", "," and ";", which can not be used
* escapes the characters "[", "]", "\", "," and ";", which cannot be used
in formspecs.
* `minetest.is_yes(arg)`
* returns true if passed 'y', 'yes', 'true' or a number that isn't zero.
@ -5812,7 +5812,7 @@ Formspec
`minetest.close_formspec(playername, "")`.
**USE THIS ONLY WHEN ABSOLUTELY NECESSARY!**
* `minetest.formspec_escape(string)`: returns a string
* escapes the characters "[", "]", "\", "," and ";", which can not be used
* escapes the characters "[", "]", "\", "," and ";", which cannot be used
in formspecs.
* `minetest.explode_table_event(string)`: returns a table
* returns e.g. `{type="CHG", row=1, column=2}`
@ -6379,7 +6379,7 @@ Misc.
* **Warning**: JSON is more strict than the Lua table format.
1. You can only use strings and positive integers of at least one as
keys.
2. You can not mix string and integer keys.
2. You cannot mix string and integer keys.
This is due to the fact that JSON has two distinct array and object
values.
* Example: `write_json({10, {a = false}})`,

View File

@ -171,7 +171,7 @@ core.update_formspec(formspec)
core.get_table_index(tablename) -> index
^ can also handle textlists
core.formspec_escape(string) -> string
^ escapes characters [ ] \ , ; that can not be used in formspecs
^ escapes characters [ ] \ , ; that cannot be used in formspecs
core.explode_table_event(string) -> table
^ returns e.g. {type="CHG", row=1, column=2}
^ type: "INV" (no row selected), "CHG" (selected) or "DCL" (double-click)

View File

@ -1302,7 +1302,7 @@
# type: int min: 0 max: 32767
# mgv7_floatland_taper = 256
# Exponent of the floatland tapering. Alters the tapering behaviour.
# Exponent of the floatland tapering. Alters the tapering behavior.
# Value = 1.0 creates a uniform, linear tapering.
# Values > 1.0 create a smooth tapering suitable for the default separated
# floatlands.

View File

@ -264,7 +264,7 @@ if(WIN32)
add_definitions ( /D "_CRT_SECURE_NO_DEPRECATE" /W1 )
# Get M_PI to work
add_definitions(/D "_USE_MATH_DEFINES")
# Dont define min/max macros in minwindef.h
# Don't define min/max macros in minwindef.h
add_definitions(/D "NOMINMAX")
endif()
set(PLATFORM_LIBS ws2_32.lib version.lib shlwapi.lib winmm.lib ${PLATFORM_LIBS})

View File

@ -53,7 +53,7 @@ Camera::Camera(MapDrawControl &draw_control, Client *client, RenderingEngine *re
{
auto smgr = rendering_engine->get_scene_manager();
// note: making the camera node a child of the player node
// would lead to unexpected behaviour, so we don't do that.
// would lead to unexpected behavior, so we don't do that.
m_playernode = smgr->addEmptySceneNode(smgr->getRootSceneNode());
m_headnode = smgr->addEmptySceneNode(m_playernode);
m_cameranode = smgr->addCameraSceneNode(smgr->getRootSceneNode());
@ -418,7 +418,7 @@ void Camera::update(LocalPlayer* player, f32 frametime, f32 tool_reload_ratio)
v3f abs_cam_up;
m_headnode->getAbsoluteTransformation().rotateVect(abs_cam_up, rel_cam_up);
// Seperate camera position for calculation
// Separate camera position for calculation
v3f my_cp = m_camera_position;
// Reposition the camera for third person view

View File

@ -1720,7 +1720,7 @@ void Client::showUpdateProgressTexture(void *args, u32 progress, u32 max_progres
TextureUpdateArgs* targs = (TextureUpdateArgs*) args;
u16 cur_percent = ceil(progress / (double) max_progress * 100.);
// update the loading menu -- if neccessary
// update the loading menu -- if necessary
bool do_draw = false;
u64 time_ms = targs->last_time_ms;
if (cur_percent != targs->last_percent) {

View File

@ -1743,7 +1743,7 @@ void GenericCAO::processMessage(const std::string &data)
} else if (cmd == AO_CMD_SET_TEXTURE_MOD) {
std::string mod = deSerializeString16(is);
// immediately reset a engine issued texture modifier if a mod sends a different one
// immediately reset an engine issued texture modifier if a mod sends a different one
if (m_reset_textures_timer > 0) {
m_reset_textures_timer = -1;
updateTextures(m_previous_texture_modifier);

View File

@ -787,7 +787,7 @@ void MapblockMeshGenerator::drawGlasslikeFramedNode()
aabb3f(-a, b, -a, a, a, -b), // z-
};
// tables of neighbour (connect if same type and merge allowed),
// tables of neighbor (connect if same type and merge allowed),
// checked with g_26dirs
// 1 = connect, 0 = face visible
@ -802,7 +802,7 @@ void MapblockMeshGenerator::drawGlasslikeFramedNode()
{1,1,1,1,1,1, 1,1,1,1, 1,1,1,1, 1,1,1,1};
const bool *check_nb = check_nb_all;
// neighbours checks for frames visibility
// neighbors checks for frames visibility
if (H_merge || V_merge) {
if (!H_merge)
check_nb = check_nb_vertical; // vertical-only merge

View File

@ -887,7 +887,7 @@ private:
void updateChat(f32 dtime);
bool nodePlacement(const ItemDefinition &selected_def, const ItemStack &selected_item,
const v3s16 &nodepos, const v3s16 &neighbourpos, const PointedThing &pointed,
const v3s16 &nodepos, const v3s16 &neighborpos, const PointedThing &pointed,
const NodeMetadata *meta);
static const ClientEventHandler clientEventHandler[CLIENTEVENT_MAX];
@ -3409,7 +3409,7 @@ void Game::handlePointingAtNode(const PointedThing &pointed,
const ItemStack &selected_item, const ItemStack &hand_item, f32 dtime)
{
v3s16 nodepos = pointed.node_undersurface;
v3s16 neighbourpos = pointed.node_abovesurface;
v3s16 neighborpos = pointed.node_abovesurface;
/*
Check information text of node
@ -3453,7 +3453,7 @@ void Game::handlePointingAtNode(const PointedThing &pointed,
// And also set the sound and send the interact
// But first check for meta formspec and rightclickable
auto &def = selected_item.getDefinition(itemdef_manager);
bool placed = nodePlacement(def, selected_item, nodepos, neighbourpos,
bool placed = nodePlacement(def, selected_item, nodepos, neighborpos,
pointed, meta);
if (placed && client->modsLoaded())
@ -3462,7 +3462,7 @@ void Game::handlePointingAtNode(const PointedThing &pointed,
}
bool Game::nodePlacement(const ItemDefinition &selected_def,
const ItemStack &selected_item, const v3s16 &nodepos, const v3s16 &neighbourpos,
const ItemStack &selected_item, const v3s16 &nodepos, const v3s16 &neighborpos,
const PointedThing &pointed, const NodeMetadata *meta)
{
const auto &prediction = selected_def.node_placement_prediction;
@ -3512,7 +3512,7 @@ bool Game::nodePlacement(const ItemDefinition &selected_def,
verbosestream << "Node placement prediction for "
<< selected_def.name << " is " << prediction << std::endl;
v3s16 p = neighbourpos;
v3s16 p = neighborpos;
// Place inside node itself if buildable_to
MapNode n_under = map.getNode(nodepos, &is_valid_position);
@ -3556,7 +3556,7 @@ bool Game::nodePlacement(const ItemDefinition &selected_def,
param2 = place_param2;
} else if (predicted_f.param_type_2 == CPT2_WALLMOUNTED ||
predicted_f.param_type_2 == CPT2_COLORED_WALLMOUNTED) {
v3s16 dir = nodepos - neighbourpos;
v3s16 dir = nodepos - neighborpos;
if (abs(dir.Y) > MYMAX(abs(dir.X), abs(dir.Z))) {
param2 = dir.Y < 0 ? 1 : 0;
@ -3634,14 +3634,14 @@ bool Game::nodePlacement(const ItemDefinition &selected_def,
try {
LocalPlayer *player = client->getEnv().getLocalPlayer();
// Dont place node when player would be inside new node
// Don't place node when player would be inside new node
// NOTE: This is to be eventually implemented by a mod as client-side Lua
if (!nodedef->get(n).walkable ||
g_settings->getBool("enable_build_where_you_stand") ||
(client->checkPrivilege("noclip") && g_settings->getBool("noclip")) ||
(nodedef->get(n).walkable &&
neighbourpos != player->getStandingNodePos() + v3s16(0, 1, 0) &&
neighbourpos != player->getStandingNodePos() + v3s16(0, 2, 0))) {
neighborpos != player->getStandingNodePos() + v3s16(0, 1, 0) &&
neighborpos != player->getStandingNodePos() + v3s16(0, 2, 0))) {
// This triggers the required mesh update too
client->addNode(p, n);
// Report to server

View File

@ -189,7 +189,7 @@ JoystickLayout create_dragonrise_gamecube_layout()
// D-Pad
JLO_A_PB(KeyType::HOTBAR_PREV, 5, 1, jlo.axes_deadzone); // left
JLO_A_PB(KeyType::HOTBAR_NEXT, 5, -1, jlo.axes_deadzone); // right
// Axis are hard to actuate independantly, best to leave up and down unused.
// Axis are hard to actuate independently, best to leave up and down unused.
//JLO_A_PB(0, 6, 1, jlo.axes_deadzone); // up
//JLO_A_PB(0, 6, -1, jlo.axes_deadzone); // down

View File

@ -138,7 +138,7 @@ bool LocalPlayer::updateSneakNode(Map *map, const v3f &position,
}
}
} else {
// legacy behaviour: check just one node
// legacy behavior: check just one node
node = map->getNode(p + v3s16(0, 1, 0), &is_valid_position);
ok = is_valid_position && !nodemgr->get(node).walkable;
}
@ -355,7 +355,7 @@ void LocalPlayer::move(f32 dtime, Environment *env, f32 pos_max_d,
v3f sneak_max = m_collisionbox.getExtent() * 0.49f;
if (m_sneak_ladder_detected) {
// restore legacy behaviour (this makes the m_speed.Y hack necessary)
// restore legacy behavior (this makes the m_speed.Y hack necessary)
sneak_max = v3f(0.4f * BS, 0.0f, 0.4f * BS);
}
@ -924,7 +924,7 @@ void LocalPlayer::old_move(f32 dtime, Environment *env, f32 pos_max_d,
pos_max_d, m_collisionbox, player_stepheight, dtime,
&position, &m_speed, accel_f);
// Positition was slightly changed; update standing node pos
// Position was slightly changed; update standing node pos
if (touching_ground)
m_standing_node = floatToInt(m_position - v3f(0.0f, 0.1f * BS, 0.0f), BS);
else

View File

@ -327,7 +327,7 @@ public:
shadowViewProj.transformVect(cam_pos, light.getPlayerPos());
m_camera_pos.set(cam_pos, services);
// I dont like using this hardcoded value. maybe something like
// I don't like using this hardcoded value. maybe something like
// MAX_TEXTURE - 1 or somthing like that??
s32 TextureLayerID = 3;
m_shadow_texture.set(&TextureLayerID, services);

View File

@ -465,7 +465,7 @@ void Sky::update(float time_of_day, float time_brightness,
video::SColorf pointcolor_sun_f(1, 1, 1, 1);
// Use tonemap only if default sun/moon tinting is used
// which keeps previous behaviour.
// which keeps previous behavior.
if (m_sun_tonemap && m_default_tint) {
pointcolor_sun_f.r = pointcolor_light *
(float)m_materials[3].EmissiveColor.getRed() / 255;

View File

@ -516,7 +516,7 @@ u32 TextureSource::getTextureId(const std::string &name)
return 0;
}
// Draw an image on top of an another one, using the alpha channel of the
// Draw an image on top of another one, using the alpha channel of the
// source image
static void blit_with_alpha(video::IImage *src, video::IImage *dst,
v2s32 src_pos, v2s32 dst_pos, v2u32 size);
@ -1854,7 +1854,7 @@ static inline video::SColor blitPixel(const video::SColor &src_c, const video::S
}
/*
Draw an image on top of an another one, using the alpha channel of the
Draw an image on top of another one, using the alpha channel of the
source image
This exists because IImage::copyToWithAlpha() doesn't seem to always
@ -1878,7 +1878,7 @@ static void blit_with_alpha(video::IImage *src, video::IImage *dst,
}
/*
Draw an image on top of an another one, using the alpha channel of the
Draw an image on top of another one, using the alpha channel of the
source image; only modify fully opaque pixels in destinaion
*/
static void blit_with_alpha_overlay(video::IImage *src, video::IImage *dst,
@ -1905,7 +1905,7 @@ static void blit_with_alpha_overlay(video::IImage *src, video::IImage *dst,
// Feel free to re-enable if you find it handy.
#if 0
/*
Draw an image on top of an another one, using the specified ratio
Draw an image on top of another one, using the specified ratio
modify all partially-opaque pixels in the destination.
*/
static void blit_with_interpolate_overlay(video::IImage *src, video::IImage *dst,

View File

@ -409,7 +409,7 @@ private:
There is an excess amount because the client sometimes
gets a block so late that the server sends it again,
and the client then sends two GOTBLOCKs.
This is resetted by PrintInfo()
This is reset by PrintInfo()
*/
u32 m_excess_gotblocks = 0;

View File

@ -33,7 +33,7 @@ class ModConfiguration
{
public:
/**
* @returns true if all dependencies are fullfilled.
* @returns true if all dependencies are fulfilled.
*/
inline bool isConsistent() const { return m_unsatisfied_mods.empty(); }

View File

@ -45,7 +45,7 @@ enum CraftMethod
/*
The type a hash can be. The earlier a type is mentioned in this enum,
the earlier it is tried at crafting, and the less likely is a collision.
Changing order causes changes in behaviour, so know what you do.
Changing order causes changes in behavior, so know what you do.
*/
enum CraftHashType
{

View File

@ -754,7 +754,7 @@ bool AuthDatabasePostgreSQL::createAuth(AuthEntry &authEntry)
int numrows = PQntuples(result);
if (numrows == 0) {
errorstream << "Strange behaviour on auth creation, no ID returned." << std::endl;
errorstream << "Strange behavior on auth creation, no ID returned." << std::endl;
PQclear(result);
rollback();
return false;

View File

@ -440,7 +440,7 @@ void GUIEditBoxWithScrollBar::setTextRect(s32 line)
// justification
switch (m_halign) {
case EGUIA_CENTER:
// align to h centre
// align to h center
m_current_text_rect.UpperLeftCorner.X = (m_frame_rect.getWidth() / 2) - (d.Width / 2);
m_current_text_rect.LowerRightCorner.X = (m_frame_rect.getWidth() / 2) + (d.Width / 2);
break;
@ -458,7 +458,7 @@ void GUIEditBoxWithScrollBar::setTextRect(s32 line)
switch (m_valign) {
case EGUIA_CENTER:
// align to v centre
// align to v center
m_current_text_rect.UpperLeftCorner.Y =
(m_frame_rect.getHeight() / 2) - (line_count*d.Height) / 2 + d.Height*line;
break;
@ -518,7 +518,7 @@ void GUIEditBoxWithScrollBar::calculateScrollPos()
if (txt_width < m_frame_rect.getWidth()) {
// TODO: Needs a clean left and right gap removal depending on HAlign, similar to vertical scrolling tests for top/bottom.
// This check just fixes the case where it was most noticable (text smaller than clipping area).
// This check just fixes the case where it was most noticeable (text smaller than clipping area).
m_hscroll_pos = 0;
setTextRect(curs_line);

View File

@ -776,7 +776,7 @@ void TextDrawer::place(const core::rect<s32> &dest_rect)
u32 charswidth = 0;
u32 wordcount = 0;
// Skip begining of line separators but include them in height
// Skip beginning of line separators but include them in height
// computation.
while (el != p.elements.end() &&
el->type == ParsedText::ELEMENT_SEPARATOR) {

View File

@ -205,7 +205,7 @@ s32 GUIInventoryList::getItemIndexAtPos(v2s32 p) const
!AbsoluteClippingRect.isPointInside(p))
return -1;
// there can not be an item if the inventory or the inventorylist does not exist
// there cannot be an item if the inventory or the inventorylist does not exist
Inventory *inv = m_invmgr->getInventory(m_inventoryloc);
if (!inv)
return -1;

View File

@ -739,7 +739,7 @@ void TouchScreenGUI::translateEvent(const SEvent &event)
/*
* Add to own copy of event list...
* android would provide this information but Irrlicht guys don't
* wanna design a efficient interface
* wanna design an efficient interface
*/
id_status toadd{};
toadd.id = event.TouchInput.ID;
@ -848,7 +848,7 @@ void TouchScreenGUI::translateEvent(const SEvent &event)
s32 dy = Y - m_pointerpos[event.TouchInput.ID].Y;
m_pointerpos[event.TouchInput.ID] = v2s32(X, Y);
// adapt to similar behaviour as pc screen
// adapt to similar behavior as pc screen
const double d = g_settings->getFloat("mouse_sensitivity", 0.001f, 10.0f) * 3.0f;
m_camera_yaw_change -= dx * d;

View File

@ -973,7 +973,7 @@ bool getCraftingResult(Inventory *inv, ItemStack &result,
if (!clist)
return false;
// Mangle crafting grid to an another format
// Mangle crafting grid to another format
CraftInput ci;
ci.method = CRAFT_METHOD_NORMAL;
ci.width = clist->getWidth() ? clist->getWidth() : 3;

View File

@ -149,7 +149,7 @@ public:
/** Constructs a shared pointer as a *secondary* reference to an object
*
* This function is intended to make a temporary reference to an object which
* is owned elsewhere so that it is not destroyed too early. To acheive that
* is owned elsewhere so that it is not destroyed too early. To achieve that
* it does balanced reference counting, i.e. reference count is increased
* in this function and decreased when the returned pointer is destroyed.
*/

View File

@ -1096,7 +1096,7 @@ core::array<scene::ISceneNode*> CGUITTFont::addTextSceneNode(const wchar_t* text
if (!Driver || !smgr) return container;
if (!parent)
parent = smgr->addEmptySceneNode(smgr->getRootSceneNode(), -1);
// if you don't specify parent, then we add a empty node attached to the root node
// if you don't specify parent, then we add an empty node attached to the root node
// this is generally undesirable.
if (!shared_plane_ptr_) //this points to a static mesh that contains the plane

View File

@ -695,7 +695,7 @@ void ServerMap::transformLiquids(std::map<v3s16, MapBlock*> &modified_blocks,
else
new_node_content = floodable_node;
} else if (ignored_sources && liquid_level >= 0) {
// Maybe there are neighbouring sources that aren't loaded yet
// Maybe there are neighboring sources that aren't loaded yet
// so prevent flowing away.
new_node_level = liquid_level;
new_node_content = liquid_kind;
@ -820,7 +820,7 @@ void ServerMap::transformLiquids(std::map<v3s16, MapBlock*> &modified_blocks,
}
/*
enqueue neighbors for update if neccessary
enqueue neighbors for update if necessary
*/
switch (m_nodedef->get(n0.getContent()).liquid_type) {
case LIQUID_SOURCE:
@ -854,7 +854,7 @@ void ServerMap::transformLiquids(std::map<v3s16, MapBlock*> &modified_blocks,
env->getScriptIface()->on_liquid_transformed(changed_nodes);
/* ----------------------------------------------------------------------
* Manage the queue so that it does not grow indefinately
* Manage the queue so that it does not grow indefinitely
*/
u16 time_until_purge = g_settings->getU16("liquid_queue_purge_time");

View File

@ -34,7 +34,7 @@ MapSettingsManager::MapSettingsManager(const std::string &map_meta_path):
* It looks as follows: (lowest prio first)
* 0: whatever is picked up from g_settings (incl. engine defaults)
* 1: defaults set by scripts (override_meta = false)
* 2: settings present in map_meta.txt or overriden by scripts
* 2: settings present in map_meta.txt or overridden by scripts
*/
m_defaults = new Settings("", &m_hierarchy, 1);
m_map_settings = new Settings("[end_of_params]", &m_hierarchy, 2);

View File

@ -376,7 +376,7 @@ void MapBlock::serialize(std::ostream &os_compressed, u8 version, bool disk, int
if(!ser_ver_supported(version))
throw VersionMismatchException("ERROR: MapBlock format not supported");
FATAL_ERROR_IF(version < SER_FMT_VER_LOWEST_WRITE, "Serialisation version error");
FATAL_ERROR_IF(version < SER_FMT_VER_LOWEST_WRITE, "Serialization version error");
std::ostringstream os_raw(std::ios_base::binary);
std::ostream &os = version >= 29 ? os_raw : os_compressed;

View File

@ -528,7 +528,7 @@ void CavesRandomWalk::carveRoute(v3f vec, float f, bool randomize_xz)
if (use_biome_liquid) {
liquidnode = c_biome_liquid;
} else {
// If cave liquid not defined by biome, fallback to old hardcoded behaviour.
// If cave liquid not defined by biome, fallback to old hardcoded behavior.
// TODO 'np_caveliquids' is deprecated and should eventually be removed.
// Cave liquids are now defined and located using biome definitions.
float nval = NoisePerlin3D(np_caveliquids, startp.X,

View File

@ -157,7 +157,7 @@ public:
// ndef is a mandatory parameter.
// If gennotify is NULL, generation events are not logged.
// If biomegen is NULL, cave liquids have classic behaviour.
// If biomegen is NULL, cave liquids have classic behavior.
CavesRandomWalk(const NodeDefManager *ndef, GenerateNotifier *gennotify =
NULL, s32 seed = 0, int water_level = 1, content_t water_source =
CONTENT_IGNORE, content_t lava_source = CONTENT_IGNORE,

View File

@ -82,7 +82,7 @@ struct MapgenDesc {
//// Built-in mapgens
////
// Order used here defines the order of appearence in mainmenu.
// Order used here defines the order of appearance in mainmenu.
// v6 always last to discourage selection.
// Special mapgens flat, fractal, singlenode, next to last. Of these, singlenode
// last to discourage selection.
@ -745,7 +745,7 @@ void MapgenBasic::generateBiomes()
nplaced = 0; // Enable top/filler placement for next surface
air_above = true;
water_above = false;
} else { // Possible various nodes overgenerated from neighbouring mapchunks
} else { // Possible various nodes overgenerated from neighboring mapchunks
nplaced = U16_MAX; // Disable top/filler placement
air_above = false;
water_above = false;

View File

@ -117,7 +117,7 @@ bool Decoration::canPlaceDecoration(MMVManip *vm, v3s16 p)
v3s16( 1, 1, -1)
};
// Check these 16 neighbouring nodes for enough spawnby nodes
// Check these 16 neighboring nodes for enough spawnby nodes
for (size_t i = 0; i != ARRLEN(dirs); i++) {
u32 index = vm->m_area.index(p + dirs[i]);
if (!vm->m_area.contains(index))

View File

@ -256,7 +256,7 @@ void Schematic::placeOnMap(ServerMap *map, v3s16 p, u32 flags,
if (flags & DECO_PLACE_CENTER_Z)
p.Z -= (s.Z - 1) / 2;
//// Create VManip for effected area, emerge our area, modify area
//// Create VManip for affected area, emerge our area, modify area
//// inside VManip, then blit back.
v3s16 bp1 = getNodeBlockPos(p);
v3s16 bp2 = getNodeBlockPos(p + s - v3s16(1, 1, 1));

View File

@ -63,7 +63,7 @@ class Server;
1 - Initial version
2 - Fixed messy never/always place; 0 probability is now never, 0xFF is always
3 - Added y-slice probabilities; this allows for variable height structures
4 - Compressed range of node occurence prob., added per-node force placement bit
4 - Compressed range of node occurrence prob., added per-node force placement bit
*/
//// Schematic constants

View File

@ -806,7 +806,7 @@ void make_pine_tree(MMVManip &vmanip, v3s16 p0, const NodeDefManager *ndef,
dev--;
}
// Centre top nodes
// Center top nodes
leaves_d[leaves_a.index(v3s16(0, 1, 0))] = 1;
leaves_d[leaves_a.index(v3s16(0, 2, 0))] = 1;
leaves_d[leaves_a.index(v3s16(0, 3, 0))] = 2;

View File

@ -548,7 +548,7 @@ u8 MapNode::getLevel(const NodeDefManager *nodemgr) const
return LIQUID_LEVEL_SOURCE;
if (f.param_type_2 == CPT2_FLOWINGLIQUID)
return getParam2() & LIQUID_LEVEL_MASK;
if(f.liquid_type == LIQUID_FLOWING) // can remove if all param_type_2 setted
if(f.liquid_type == LIQUID_FLOWING) // can remove if all param_type_2 set
return getParam2() & LIQUID_LEVEL_MASK;
if (f.param_type_2 == CPT2_LEVELED) {
u8 level = getParam2() & LEVELED_MASK;

View File

@ -66,6 +66,6 @@ public:
virtual ~MtEventManager() = default;
virtual void put(MtEvent *e) = 0;
virtual void reg(MtEvent::Type type, event_receive_func f, void *data) = 0;
// If data==NULL, every occurence of f is deregistered.
// If data==NULL, every occurrence of f is deregistered.
virtual void dereg(MtEvent::Type type, event_receive_func f, void *data) = 0;
};

View File

@ -86,7 +86,7 @@ void Client::handleCommand_Hello(NetworkPacket* pkt)
//TODO verify that username_legacy matches sent username, only
// differs in casing (make both uppercase and compare)
// This is only neccessary though when we actually want to add casing support
// This is only necessary though when we actually want to add casing support
if (m_chosen_auth_mech != AUTH_MECHANISM_NONE) {
// we received a TOCLIENT_HELLO while auth was already going on
@ -186,7 +186,7 @@ void Client::handleCommand_DenySudoMode(NetworkPacket* pkt)
void Client::handleCommand_AccessDenied(NetworkPacket* pkt)
{
// The server didn't like our password. Note, this needs
// to be processed even if the serialisation format has
// to be processed even if the serialization format has
// not been agreed yet, the same as TOCLIENT_INIT.
m_access_denied = true;
m_access_denied_reason = "Unknown";

View File

@ -364,7 +364,7 @@ public:
u16 readNextIncomingSeqNum();
u16 incNextIncomingSeqNum();
u16 getOutgoingSequenceNumber(bool& successfull);
u16 getOutgoingSequenceNumber(bool& successful);
u16 readOutgoingSequenceNumber();
bool putBackSequenceNumber(u16);

View File

@ -1130,7 +1130,7 @@ SharedBuffer<u8> ConnectionReceiveThread::handlePacketType_Control(Channel *chan
// Get round trip time
u64 current_time = porting::getTimeMs();
// a overflow is quite unlikely but as it'd result in major
// an overflow is quite unlikely but as it'd result in major
// rtt miscalculation we handle it here
if (current_time > p->absolute_send_time) {
float rtt = (current_time - p->absolute_send_time) / 1000.0;
@ -1277,7 +1277,7 @@ SharedBuffer<u8> ConnectionReceiveThread::handlePacketType_Reliable(Channel *cha
throw ProcessedSilentlyException(
"Received packet newer then expected, not sending ack");
/* seems like our ack was lost, send another one for a old packet */
/* seems like our ack was lost, send another one for an old packet */
if (is_old_packet) {
LOG(dout_con << m_connection->getDesc()
<< "RE-SENDING ACK: peer_id: " << peer->id

View File

@ -243,7 +243,7 @@ enum ToClientCommand
/*
Sent after TOSERVER_INIT.
u8 deployed serialisation version
u8 deployed serialization version
u16 deployed network compression mode
u16 deployed protocol version
u32 supported auth methods
@ -841,7 +841,7 @@ enum ToServerCommand
/*
Sent first after connected.
u8 serialisation version (=SER_FMT_VER_HIGHEST_READ)
u8 serialization version (=SER_FMT_VER_HIGHEST_READ)
u16 supported network compression modes
u16 minimum supported network protocol version
u16 maximum supported network protocol version

View File

@ -1355,7 +1355,7 @@ void NodeDefManager::eraseIdFromGroups(content_t id)
// Get the group items vector.
std::vector<content_t> &items = iter_groups->second;
// Remove any occurence of the id in the group items vector.
// Remove any occurrence of the id in the group items vector.
items.erase(std::remove(items.begin(), items.end(), id), items.end());
// If group is empty, erase its vector from the map.

View File

@ -213,10 +213,10 @@ enum NodeDrawType
// paramtype2 = "meshoptions" allows various forms, sizes and
// vertical and horizontal random offsets.
NDT_PLANTLIKE,
// Fenceposts that connect to neighbouring fenceposts with horizontal bars
// Fenceposts that connect to neighboring fenceposts with horizontal bars
NDT_FENCELIKE,
// Selects appropriate junction texture to connect like rails to
// neighbouring raillikes.
// neighboring raillikes.
NDT_RAILLIKE,
// Custom Lua-definable structure of multiple cuboids
NDT_NODEBOX,
@ -225,7 +225,7 @@ enum NodeDrawType
// Uses 3 textures, one for frames, second for faces,
// optional third is a 'special tile' for the liquid.
NDT_GLASSLIKE_FRAMED,
// Draw faces slightly rotated and only on neighbouring nodes
// Draw faces slightly rotated and only on neighboring nodes
NDT_FIRELIKE,
// Enabled -> ndt_glasslike_framed, disabled -> ndt_glasslike
NDT_GLASSLIKE_FRAMED_OPTIONAL,

View File

@ -92,7 +92,7 @@ public:
}
}
}
// Undefined behaviour if there already is a timer
// Undefined behavior if there already is a timer
void insert(const NodeTimer &timer) {
v3s16 p = timer.position;
double trigger_time = m_time + (double)(timer.timeout - timer.elapsed);

View File

@ -66,7 +66,7 @@ public:
throw PrngException("Invalid range (max < min)");
/*
Here, we ensure the range is not too large relative to RANDOM_MAX,
as otherwise the effects of bias would become noticable. Unlike
as otherwise the effects of bias would become noticeable. Unlike
PcgRandom, we cannot modify this RNG's range as it would change the
output of this RNG for reverse compatibility.
*/

View File

@ -205,7 +205,7 @@ private:
/**
* transform index pos to mappos
* @param ipos a index position
* @param ipos an index position
* @return map position
*/
v3s16 getRealPos(v3s16 ipos);
@ -238,7 +238,7 @@ private:
v3s16 invert(v3s16 pos);
/**
* check if a index is within current search area
* check if an index is within current search area
* @param index position to validate
* @return true/false
*/

View File

@ -418,7 +418,7 @@ bool setSystemPaths()
path_share = exepath + "\\..";
if (detectMSVCBuildDir(exepath)) {
// The msvc build dir schould normaly not be present if properly installed,
// but its usefull for debugging.
// but its useful for debugging.
path_share += DIR_DELIM "..";
}

View File

@ -26,7 +26,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
bool RaycastSort::operator() (const PointedThing &pt1,
const PointedThing &pt2) const
{
// "nothing" can not be sorted
// "nothing" cannot be sorted
assert(pt1.type != POINTEDTHING_NOTHING);
assert(pt2.type != POINTEDTHING_NOTHING);
f32 pt1_distSq = pt1.distanceSq;

View File

@ -52,7 +52,7 @@ void ReflowScan::scan(MapBlock *block, UniqueQueue<v3s16> *liquid_queue)
scanColumn(x, z);
}
// Scan neighbouring columns from the nearby blocks as they might contain
// Scan neighboring columns from the nearby blocks as they might contain
// liquid nodes that weren't allowed to flow to prevent gaps.
for (s16 i = 0; i < MAP_BLOCKSIZE; i++) {
scanColumn(i, -1);
@ -66,7 +66,7 @@ inline MapBlock *ReflowScan::lookupBlock(int x, int y, int z)
{
// Gets the block that contains (x,y,z) relativ to the scanned block.
// This uses a lookup as there might be many lookups into the same
// neighbouring block which makes fetches from Map costly.
// neighboring block which makes fetches from Map costly.
int bx = (MAP_BLOCKSIZE + x) / MAP_BLOCKSIZE;
int by = (MAP_BLOCKSIZE + y) / MAP_BLOCKSIZE;
int bz = (MAP_BLOCKSIZE + z) / MAP_BLOCKSIZE;
@ -105,7 +105,7 @@ inline bool ReflowScan::isLiquidFlowableTo(int x, int y, int z)
inline bool ReflowScan::isLiquidHorizontallyFlowable(int x, int y, int z)
{
// Check if the (x,y,z) might spread to one of the horizontally
// neighbouring nodes
// neighboring nodes
return isLiquidFlowableTo(x - 1, y, z) ||
isLiquidFlowableTo(x + 1, y, z) ||
isLiquidFlowableTo(x, y, z - 1) ||

View File

@ -39,7 +39,7 @@ extern "C" {
#include "itemgroup.h"
#include "itemdef.h"
#include "c_types.h"
// We do a explicit path include because by default c_content.h include src/client/hud.h
// We do an explicit path include because by default c_content.h include src/client/hud.h
// prior to the src/hud.h, which is not good on server only build
#include "../../hud.h"
#include "content/mods.h"

View File

@ -54,7 +54,7 @@ public:
~LuaAreaStore();
// AreaStore()
// Creates a AreaStore and leaves it on top of stack
// Creates an AreaStore and leaves it on top of stack
static int create_object(lua_State *L);
static void Register(lua_State *L);

View File

@ -884,7 +884,7 @@ int ModApiMainMenu::l_download_file(lua_State *L)
}
} else {
errorstream << "DOWNLOAD denied: " << absolute_destination
<< " isn't a allowed path" << std::endl;
<< " isn't an allowed path" << std::endl;
}
lua_pushboolean(L,false);
return 1;

View File

@ -37,7 +37,7 @@ private:
static std::string getTextData(lua_State *L, std::string name);
/**
* read a integer variable from gamedata table within lua stack
* read an integer variable from gamedata table within lua stack
* @param L stack to read variable from
* @param name name of variable to read
* @return integer value of requested variable

View File

@ -408,7 +408,7 @@ Biome *read_biome_def(lua_State *L, int index, const NodeDefManager *ndef)
size_t nnames = getstringlistfield(L, index, "node_cave_liquid", &nn);
// If no cave liquids defined, set list to "ignore" to trigger old hardcoded
// cave liquid behaviour.
// cave liquid behavior.
if (nnames == 0) {
nn.emplace_back("ignore");
nnames = 1;

View File

@ -1813,7 +1813,7 @@ int ObjectRef::l_set_sky(lua_State *L)
sky_params.type = luaL_checkstring(L, 3);
// Preserve old behaviour of the sun, moon and stars
// Preserve old behavior of the sun, moon and stars
// when using the old set_sky call.
if (sky_params.type == "regular") {
sun_params.visible = true;

View File

@ -1092,7 +1092,7 @@ PlayerSAO* Server::StageTwoClientInit(session_t peer_id)
if (!playersao || !player) {
if (player && player->getPeerId() != PEER_ID_INEXISTENT) {
actionstream << "Server: Failed to emerge player \"" << playername
<< "\" (player allocated to an another client)" << std::endl;
<< "\" (player allocated to another client)" << std::endl;
DenyAccess(peer_id, SERVER_ACCESSDENIED_ALREADY_CONNECTED);
} else {
errorstream << "Server: " << playername << ": Failed to emerge player"

View File

@ -157,7 +157,7 @@ public:
void start();
void stop();
// This is mainly a way to pass the time to the server.
// Actual processing is done in an another thread.
// Actual processing is done in another thread.
void step(float dtime);
// This is run by ServerThread and does the actual processing
void AsyncRunStep(bool initial_step=false);

View File

@ -826,10 +826,10 @@ public:
delete aabms;
}
// Find out how many objects the given block and its neighbours contain.
// Find out how many objects the given block and its neighbors contain.
// Returns the number of objects in the block, and also in 'wider' the
// number of objects in the block and all its neighbours. The latter
// may an estimate if any neighbours are unloaded.
// number of objects in the block and all its neighbors. The latter
// may an estimate if any neighbors are unloaded.
u32 countObjects(MapBlock *block, ServerMap * map, u32 &wider)
{
wider = 0;
@ -1081,7 +1081,7 @@ bool ServerEnvironment::swapNode(v3s16 p, const MapNode &n)
u8 ServerEnvironment::findSunlight(v3s16 pos) const
{
// Directions for neighbouring nodes with specified order
// Directions for neighboring nodes with specified order
static const v3s16 dirs[] = {
v3s16(-1, 0, 0), v3s16(1, 0, 0), v3s16(0, 0, -1), v3s16(0, 0, 1),
v3s16(0, -1, 0), v3s16(0, 1, 0)
@ -1156,7 +1156,7 @@ u8 ServerEnvironment::findSunlight(v3s16 pos) const
// Found a valid daylight
found_light = possible_finlight;
} else {
// Sunlight may be darker, so walk the neighbours
// Sunlight may be darker, so walk the neighbors
stack.push({neighborPos, dist});
}
}
@ -1991,7 +1991,7 @@ void ServerEnvironment::activateObjects(MapBlock *block, u32 dtime_s)
void ServerEnvironment::deactivateFarObjects(bool _force_delete)
{
auto cb_deactivate = [this, _force_delete](ServerActiveObject *obj, u16 id) {
// force_delete might be overriden per object
// force_delete might be overridden per object
bool force_delete = _force_delete;
// Do not deactivate if disallowed

View File

@ -454,7 +454,7 @@ fake_function() {
gettext("Floatland tapering distance");
gettext("Y-distance over which floatlands taper from full density to nothing.\nTapering starts at this distance from the Y limit.\nFor a solid floatland layer, this controls the height of hills/mountains.\nMust be less than or equal to half the distance between the Y limits.");
gettext("Floatland taper exponent");
gettext("Exponent of the floatland tapering. Alters the tapering behaviour.\nValue = 1.0 creates a uniform, linear tapering.\nValues > 1.0 create a smooth tapering suitable for the default separated\nfloatlands.\nValues < 1.0 (for example 0.25) create a more defined surface level with\nflatter lowlands, suitable for a solid floatland layer.");
gettext("Exponent of the floatland tapering. Alters the tapering behavior.\nValue = 1.0 creates a uniform, linear tapering.\nValues > 1.0 create a smooth tapering suitable for the default separated\nfloatlands.\nValues < 1.0 (for example 0.25) create a more defined surface level with\nflatter lowlands, suitable for a solid floatland layer.");
gettext("Floatland density");
gettext("Adjusts the density of the floatland layer.\nIncrease value to increase density. Can be positive or negative.\nValue = 0.0: 50% of volume is floatland.\nValue = 2.0 (can be higher depending on 'mgv7_np_floatland', always test\nto be sure) creates a solid floatland layer.");
gettext("Floatland water level");

View File

@ -233,7 +233,7 @@ u32 calculateResultWear(const u32 uses, const u16 initial_wear)
only oversized blocks remain.
This also implies the raw tool wear number
increases a bit faster after this point,
but this should be barely noticable by the
but this should be barely noticeable by the
player.
*/
u16 wear_extra_at = blocks_normal * wear_normal;

View File

@ -512,7 +512,7 @@ struct TestMapBlock: public TestBase
while being underground
*/
{
// Make neighbours to exist and set some non-sunlight to them
// Make neighbors to exist and set some non-sunlight to them
parent.position_valid = true;
b.setIsUnderground(true);
parent.node.setLight(LIGHTBANK_DAY, LIGHT_MAX/2);
@ -547,7 +547,7 @@ struct TestMapBlock: public TestBase
}
}
}
// Make neighbours invalid
// Make neighbors invalid
parent.position_valid = false;
// Add exceptions to the top of the bottom block
for(u16 x=0; x<MAP_BLOCKSIZE; x++)

View File

@ -69,7 +69,7 @@ void AreaStore::serialize(std::ostream &os) const
// After 5.1.0-dev: version >= 5 throws SerializationError
// Forwards-compatibility is assumed before version 5.
writeU8(os, 0); // Serialisation version
writeU8(os, 0); // Serialization version
// TODO: Compression?
writeU16(os, areas_map.size());

View File

@ -147,7 +147,7 @@ public:
m_signal.post();
}
/* this version of pop_front returns a empty element of T on timeout.
/* this version of pop_front returns an empty element of T on timeout.
* Make sure default constructor of T creates a recognizable "empty" element
*/
T pop_frontNoEx(u32 wait_time_max_ms)
@ -200,7 +200,7 @@ public:
throw ItemNotFoundException("MutexedQueue: queue is empty");
}
/* this version of pop_back returns a empty element of T on timeout.
/* this version of pop_back returns an empty element of T on timeout.
* Make sure default constructor of T creates a recognizable "empty" element
*/
T pop_backNoEx(u32 wait_time_max_ms)

View File

@ -147,7 +147,7 @@ bool isBlockInSight(v3s16 blockpos_b, v3f camera_pos, v3f camera_dir,
// Adjust camera position, for purposes of computing the angle,
// such that a block that has any portion visible with the
// current camera position will have the center visible at the
// adjusted postion
// adjusted position
f32 adjdist = BLOCK_MAX_RADIUS / cos((M_PI - camera_fov) / 2);
// Block position relative to adjusted camera
@ -161,7 +161,7 @@ bool isBlockInSight(v3s16 blockpos_b, v3f camera_pos, v3f camera_dir,
f32 cosangle = dforward / blockpos_adj.getLength();
// If block is not in the field of view, skip it
// HOTFIX: use sligthly increased angle (+10%) to fix too agressive
// HOTFIX: use sligthly increased angle (+10%) to fix too aggressive
// culling. Somebody have to find out whats wrong with the math here.
// Previous value: camera_fov / 2
if (cosangle < std::cos(camera_fov * 0.55f))

View File

@ -50,10 +50,10 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* The licence and distribution terms for any publically available version or
* The license and distribution terms for any publicly available version or
* derivative of this code cannot be changed. i.e. this code cannot simply be
* copied and put under another distribution licence
* [including the GNU Public Licence.]
* copied and put under another distribution license
* [including the GNU Public License.]
*/
#pragma once

View File

@ -48,7 +48,7 @@ public:
return ret;
}
// Returns substr up to the next occurence of sep that isn't escaped with esc ('\\')
// Returns substr up to the next occurrence of sep that isn't escaped with esc ('\\')
String next_esc(const String &sep, T esc=static_cast<T>('\\'))
{
if (pos >= str.size())

View File

@ -450,7 +450,7 @@ inline void str_replace(std::string &str, const std::string &pattern,
}
/**
* Escapes characters [ ] \ , ; that can not be used in formspecs
* Escapes characters [ ] \ , ; that cannot be used in formspecs
*/
inline void str_formspec_escape(std::string &str)
{
@ -729,7 +729,7 @@ inline std::string str_join(const std::vector<std::string> &list,
}
/**
* Create a UTF8 std::string from a irr::core::stringw.
* Create a UTF8 std::string from an irr::core::stringw.
*/
inline std::string stringw_to_utf8(const irr::core::stringw &input)
{
@ -738,7 +738,7 @@ inline std::string stringw_to_utf8(const irr::core::stringw &input)
}
/**
* Create a irr::core:stringw from a UTF8 std::string.
* Create an irr::core:stringw from a UTF8 std::string.
*/
inline irr::core::stringw utf8_to_stringw(const std::string &input)
{

View File

@ -11,7 +11,7 @@ SET(CMAKE_RC_COMPILER i686-w64-mingw32-windres)
# here is the target environment located
SET(CMAKE_FIND_ROOT_PATH /usr/i686-w64-mingw32)
# adjust the default behaviour of the FIND_XXX() commands:
# adjust the default behavior of the FIND_XXX() commands:
# search headers and libraries in the target environment, search
# programs in the host environment
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)

View File

@ -9,7 +9,7 @@ SET(CMAKE_RC_COMPILER i686-w64-mingw32-windres)
# here is the target environment located
SET(CMAKE_FIND_ROOT_PATH /usr/i686-w64-mingw32)
# adjust the default behaviour of the FIND_XXX() commands:
# adjust the default behavior of the FIND_XXX() commands:
# search headers and libraries in the target environment, search
# programs in the host environment
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)

View File

@ -11,7 +11,7 @@ SET(CMAKE_RC_COMPILER x86_64-w64-mingw32-windres)
# here is the target environment located
SET(CMAKE_FIND_ROOT_PATH /usr/x86_64-w64-mingw32)
# adjust the default behaviour of the FIND_XXX() commands:
# adjust the default behavior of the FIND_XXX() commands:
# search headers and libraries in the target environment, search
# programs in the host environment
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)

View File

@ -9,7 +9,7 @@ SET(CMAKE_RC_COMPILER x86_64-w64-mingw32-windres)
# here is the target environment located
SET(CMAKE_FIND_ROOT_PATH /usr/x86_64-w64-mingw32)
# adjust the default behaviour of the FIND_XXX() commands:
# adjust the default behavior of the FIND_XXX() commands:
# search headers and libraries in the target environment, search
# programs in the host environment
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)