Skip to content

Commit

Permalink
fixing grammar in comments - mostly it's -> its
Browse files Browse the repository at this point in the history
  • Loading branch information
Brambor committed Apr 30, 2023
1 parent 533dd1f commit 621e33d
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 19 deletions.
6 changes: 3 additions & 3 deletions src/behavior.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ struct behavior_return {
// The behavior tree performs a depth-first traversal until it reaches an unmet goal.
// When tick is invoked, it visits root -> node_t::tick -> strategy -> children -> node_t::tick
// At each level, the strategy determines the order in which to visit the current node's children.
// Once a leaf node is reached, it either returns success, indicating it's requirements are met,
// failure, indicating that it is incapable of satisfying it's requirements, or running, indicating
// that it is capable of addressing tis requirements, but that they aren't met yet.
// Once a leaf node is reached, it either returns success, indicating its requirements are met,
// failure, indicating that it is incapable of satisfying its requirements, or running, indicating
// that it is capable of addressing its requirements, but that they aren't met yet.
// In practice, the tree is traversed until it reaches a node that returns running,
// meaning that it is capable of making progress if set as a goal.
// The arrangement of the tree and configuration of iteration strategies guarantees that it visits
Expand Down
4 changes: 2 additions & 2 deletions src/generic_factory.h
Original file line number Diff line number Diff line change
Expand Up @@ -670,14 +670,14 @@ static_assert( !supports_relative<bool>::value, "bools should not support relati
static_assert( !supports_proportional<bool>::value, "bools should not support proportional" );

// Using string ids with ints doesn't make sense in practice, but it doesn't matter here
// The type that it is templated with does not change it's behavior
// The type that it is templated with does not change its behavior
static_assert( !supports_relative<string_id<int>>::value,
"string ids should not support relative" );
static_assert( !supports_proportional<string_id<int>>::value,
"string ids should not support proportional" );

// Using int ids with ints doesn't make sense in practice, but it doesn't matter here
// The type that it is templated with does not change it's behavior
// The type that it is templated with does not change its behavior
static_assert( !supports_relative<int_id<int>>::value,
"int ids should not support relative" );
static_assert( !supports_proportional<int_id<int>>::value,
Expand Down
2 changes: 1 addition & 1 deletion src/third-party/flatbuffers/flatbuffers.h
Original file line number Diff line number Diff line change
Expand Up @@ -1433,7 +1433,7 @@ class FlatBufferBuilder {
// If you get this assert, a corresponding StartTable wasn't called.
FLATBUFFERS_ASSERT(nested);
// Write the vtable offset, which is the start of any Table.
// We fill it's value later.
// We fill its value later.
auto vtableoffsetloc = PushElement<soffset_t>(0);
// Write a vtable, which consists entirely of voffset_t elements.
// It starts with the number of offsets, followed by a type id, followed
Expand Down
2 changes: 1 addition & 1 deletion src/third-party/flatbuffers/idl.h
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ struct Type {
uint16_t fixed_length; // only set if t == BASE_TYPE_ARRAY
};

// Represents a parsed scalar value, it's type, and field offset.
// Represents a parsed scalar value, its type, and field offset.
struct Value {
Value()
: constant("0"),
Expand Down
18 changes: 9 additions & 9 deletions src/vehicle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -965,7 +965,7 @@ bool vehicle::is_alternator_on( const vehicle_part &vp ) const
&& vp_engine.enabled
&& fuel_left( vp_engine.fuel_current() )
&& !vp_engine.has_fault_flag( "NO_ALTERNATOR_CHARGE" ) ) {
return true; // the engine can drive it's alternator
return true; // the engine can drive its alternator
}
}
return false;
Expand Down Expand Up @@ -1373,9 +1373,9 @@ bool vehicle::is_connected( const vehicle_part &to, const vehicle_part &from,
vehicle_part vp_next = parts[ parts_there[ 0 ] ];

if( vp_next.info().location != part_location_structure || // not a structure part
vp_next.info().has_flag( "PROTRUSION" ) || // protrusions are not really structure
vp_next.has_flag( vp_flag::carried_flag ) ) { // carried frames are not structure
continue; // can't connect if it's not structure
vp_next.info().has_flag( "PROTRUSION" ) || // protrusions are not really a structure
vp_next.has_flag( vp_flag::carried_flag ) ) { // carried frames are not a structure
continue; // can't connect if it's not a structure
}

if( visited.insert( vp_next.mount ).second ) { // .second is false if already in visited
Expand Down Expand Up @@ -1533,16 +1533,16 @@ std::vector<vehicle::unrackable_vehicle> vehicle::find_vehicles_to_unrack( int r
for( const std::vector<int> &rack_parts : find_lines_of_parts( rack, "BIKE_RACK_VEH" ) ) {
unrackable_vehicle unrackable;

// a racked vehicle is "finished" by collecting all of it's carried parts and carrying racks
// a racked vehicle is "finished" by collecting all of its carried parts and carrying racks
// involved, if any parts have been collected add them to the lists and clear the temporary
// variables for next carried vehicle
// variables for the next carried vehicle
const auto commit_vehicle = [&]() {
if( unrackable.racks.empty() ) {
return; // not valid unrackable
}

// 2 results with same name is either a bug or this rack is a "corner" that scanned
// the vehicle twice: once on correct axis and once on wrong axis resulting in a 1 tile
// 2 results with the same name either indicate a bug or this rack is a "corner" that scanned
// the vehicle twice: once on the correct axis and once on the wrong axis resulting in a 1 tile
// slice see #47374 for more details. Keep the longest of the two "slices".
const auto same_name = std::find_if( unrackables.begin(), unrackables.end(),
[name = unrackable.name]( const unrackable_vehicle & v ) {
Expand Down Expand Up @@ -4060,7 +4060,7 @@ double vehicle::coeff_rolling_drag() const
if( wheelcache.empty() ) {
wheel_factor = 50;
} else {
// should really sum the each wheel's c_rolling_resistance * it's share of vehicle mass
// should really sum each wheel's c_rolling_resistance * its share of vehicle mass
for( int wheel : wheelcache ) {
wheel_factor += parts[ wheel ].info().wheel_rolling_resistance();
}
Expand Down
2 changes: 1 addition & 1 deletion src/vehicle.h
Original file line number Diff line number Diff line change
Expand Up @@ -1989,7 +1989,7 @@ class vehicle
std::vector<vehicle_part> real_parts() const;
// Map of edge parts and their adjacency information
std::map<point, vpart_edge_info> edges; // NOLINT(cata-serialize)
// For a given mount point, returns it's adjacency info
// For a given mount point, returns its adjacency info
vpart_edge_info get_edge_info( const point &mount ) const;

// Removes fake parts from the parts vector
Expand Down
2 changes: 1 addition & 1 deletion src/vehicle_use.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1260,7 +1260,7 @@ void vehicle::open_or_close( const int part_index, const bool opening )
parts.at( prt.fake_part_at ).open = opening;
}
};
//find_lines_of_parts() doesn't return the part_index we passed, so we set it on it's own
//find_lines_of_parts() doesn't return the part_index we passed, so we set it on its own
part_open_or_close( part_index, opening );
insides_dirty = true;
map &here = get_map();
Expand Down
2 changes: 1 addition & 1 deletion src/worldfactory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ void worldfactory::init()

// This returns files as well, but they are going to be discarded later as
// we look for files *within* these dirs. If it's a file, there won't be
// be any of those inside it and is_save_dir will return false.
// any files inside it and is_save_dir will return false.
for( const std::string &dir : get_files_from_path( "", PATH_INFO::savedir(), false ) ) {
if( !is_save_dir( dir ) ) {
continue;
Expand Down

0 comments on commit 621e33d

Please sign in to comment.