diff --git a/src/strgen/strgen.cpp b/src/strgen/strgen.cpp index e930369..8e5ee4d 100644 --- a/src/strgen/strgen.cpp +++ b/src/strgen/strgen.cpp @@ -263,7 +263,7 @@ struct FileWriter { /** Make sure the file is closed. */ virtual ~FileWriter() { - /* If we weren't closed an exception was thrown, so remove the termporary file. */ + /* If we weren't closed an exception was thrown, so remove the temporary file. */ if (fh != NULL) { fclose(this->fh); unlink(this->filename); @@ -371,16 +371,16 @@ static inline void ottd_mkdir(const char *directory) /** * Create a path consisting of an already existing path, a possible - * path seperator and the filename. The seperator is only appended if the path - * does not already end with a seperator + * path separator and the filename. The separator is only appended if the path + * does not already end with a separator */ static inline char *mkpath(char *buf, size_t buflen, const char *path, const char *file) { ttd_strlcpy(buf, path, buflen); // copy directory into buffer - char *p = strchr(buf, '\0'); // add path seperator if necessary + char *p = strchr(buf, '\0'); // add path separator if necessary if (p[-1] != PATHSEPCHAR && (size_t)(p - buf) + 1 < buflen) *p++ = PATHSEPCHAR; - ttd_strlcpy(p, file, buflen - (size_t)(p - buf)); // catenate filename at end of buffer + ttd_strlcpy(p, file, buflen - (size_t)(p - buf)); // concatenate filename at end of buffer return buf; } diff --git a/src/strgen/strgen.h b/src/strgen/strgen.h index 18ea269..22b24a2 100644 --- a/src/strgen/strgen.h +++ b/src/strgen/strgen.h @@ -44,7 +44,7 @@ struct StringData { LangString **strings; ///< Array of all known strings. uint16 *hash_heads; ///< Hash table for the strings. size_t tabs; ///< The number of 'tabs' of strings. - size_t max_strings; ///< The maxmimum number of strings. + size_t max_strings; ///< The maximum number of strings. int next_string_id; ///< The next string ID to allocate. StringData(size_t tabs); diff --git a/src/strgen/strgen_base.cpp b/src/strgen/strgen_base.cpp index 7e4516f..adb1de0 100644 --- a/src/strgen/strgen_base.cpp +++ b/src/strgen/strgen_base.cpp @@ -235,7 +235,7 @@ static int _cur_argidx; /** The buffer for writing a single string. */ struct Buffer : SmallVector { /** - * Conveniance method for adding a byte. + * Convenience method for adding a byte. * @param value The value to add. */ void AppendByte(byte value)