Skip to content

Commit 75f56b3

Browse files
committed
spell correct
1 parent c922801 commit 75f56b3

File tree

10 files changed

+36
-32
lines changed

10 files changed

+36
-32
lines changed

trantor/net/TLSPolicy.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ struct TRANTOR_EXPORT TLSPolicy final
6767

6868
/**
6969
* @brief enables the use of the old TLS protocol (old meaning < TLS 1.2).
70-
* TLS providres may not support old protocols even if this option is set
70+
* TLS providers may not support old protocols even if this option is set
7171
*/
7272
TLSPolicy &setUseOldTLS(bool useOldTLS)
7373
{
@@ -79,7 +79,7 @@ struct TRANTOR_EXPORT TLSPolicy final
7979
* @brief set the list of protocols to be used for ALPN.
8080
*
8181
* @note for servers, it selects matching protocol against the client's
82-
* list. And the first matching protocol supplide in the parameter will be
82+
* list. And the first matching protocol supplied in the parameter will be
8383
* selected. If no matching protocol is found, the connection will be
8484
* closed.
8585
*

trantor/unittests/DateUnittest.cc

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,23 @@ TEST(Date, constructorTest)
77
{
88
EXPECT_STREQ("1985-01-01 00:00:00",
99
trantor::Date(1985, 1, 1)
10-
.toCustomedFormattedStringLocal("%Y-%m-%d %H:%M:%S")
10+
.toCustomizedFormattedStringLocal("%Y-%m-%d %H:%M:%S")
1111
.c_str());
1212
EXPECT_STREQ("2004-02-29 00:00:00.000000",
1313
trantor::Date(2004, 2, 29)
14-
.toCustomedFormattedStringLocal("%Y-%m-%d %H:%M:%S", true)
14+
.toCustomizedFormattedStringLocal("%Y-%m-%d %H:%M:%S",
15+
true)
1516
.c_str());
1617
EXPECT_STRNE("2001-02-29 00:00:00.000000",
1718
trantor::Date(2001, 2, 29)
18-
.toCustomedFormattedStringLocal("%Y-%m-%d %H:%M:%S", true)
19+
.toCustomizedFormattedStringLocal("%Y-%m-%d %H:%M:%S",
20+
true)
1921
.c_str());
2022
EXPECT_STREQ("2018-01-01 00:00:00.000000",
2123
trantor::Date(2018, 1, 1, 12, 12, 12, 2321)
2224
.roundDay()
23-
.toCustomedFormattedStringLocal("%Y-%m-%d %H:%M:%S", true)
25+
.toCustomizedFormattedStringLocal("%Y-%m-%d %H:%M:%S",
26+
true)
2427
.c_str());
2528
}
2629
TEST(Date, DatabaseStringTest)

trantor/utils/AsyncFileLogger.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ void AsyncFileLogger::LoggerFile::switchLog(bool openNewOne)
269269
// NOTE: Remember to update initFilenameQueue() if name format changes
270270
std::string newName =
271271
filePath_ + fileBaseName_ + "." +
272-
creationDate_.toCustomedFormattedString("%y%m%d-%H%M%S") +
272+
creationDate_.toCustomizedFormattedString("%y%m%d-%H%M%S") +
273273
std::string(seq) + fileExtName_;
274274
#if !defined(_WIN32) || defined(__MINGW32__)
275275
rename(fileFullName_.c_str(), newName.c_str());

trantor/utils/Date.cc

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,8 @@ std::string Date::toFormattedString(bool showMicroseconds) const
142142
}
143143
return buf;
144144
}
145-
std::string Date::toCustomedFormattedString(const std::string &fmtStr,
146-
bool showMicroseconds) const
145+
std::string Date::toCustomizedFormattedString(const std::string &fmtStr,
146+
bool showMicroseconds) const
147147
{
148148
char buf[256] = {0};
149149
time_t seconds =
@@ -163,9 +163,9 @@ std::string Date::toCustomedFormattedString(const std::string &fmtStr,
163163
snprintf(decimals, sizeof(decimals), ".%06d", microseconds);
164164
return std::string(buf) + decimals;
165165
}
166-
void Date::toCustomedFormattedString(const std::string &fmtStr,
167-
char *str,
168-
size_t len) const
166+
void Date::toCustomizedFormattedString(const std::string &fmtStr,
167+
char *str,
168+
size_t len) const
169169
{
170170
// not safe
171171
time_t seconds =
@@ -323,8 +323,8 @@ Date Date::fromDbString(const std::string &datetime)
323323
static_cast<double>(timezoneOffset()));
324324
}
325325

326-
std::string Date::toCustomedFormattedStringLocal(const std::string &fmtStr,
327-
bool showMicroseconds) const
326+
std::string Date::toCustomizedFormattedStringLocal(const std::string &fmtStr,
327+
bool showMicroseconds) const
328328
{
329329
char buf[256] = {0};
330330
time_t seconds =

trantor/utils/Date.h

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ class TRANTOR_EXPORT Date
203203
std::string toFormattedString(bool showMicroseconds) const;
204204

205205
/**
206-
* @brief Generate a UTC time string formated by the @p fmtStr
206+
* @brief Generate a UTC time string formatted by the @p fmtStr
207207
* @param fmtStr is the format string for the function strftime()
208208
* @param showMicroseconds whether the microseconds are returned.
209209
* @note Examples:
@@ -212,26 +212,27 @@ class TRANTOR_EXPORT Date
212212
* - "2018-01-01 10:10:25:102414" if the @p fmtStr is "%Y-%m-%d %H:%M:%S"
213213
* and the @p showMicroseconds is true
214214
*/
215-
std::string toCustomedFormattedString(const std::string &fmtStr,
216-
bool showMicroseconds = false) const;
215+
std::string toCustomizedFormattedString(
216+
const std::string &fmtStr,
217+
bool showMicroseconds = false) const;
217218

218219
/**
219220
* @brief Generate a local time zone string, the format of the string is
220-
* same as the mothed toFormattedString
221+
* same as the method toFormattedString
221222
*
222223
* @param showMicroseconds
223224
* @return std::string
224225
*/
225226
std::string toFormattedStringLocal(bool showMicroseconds) const;
226227

227228
/**
228-
* @brief Generate a local time zone string formated by the @p fmtStr
229+
* @brief Generate a local time zone string formatted by the @p fmtStr
229230
*
230231
* @param fmtStr
231232
* @param showMicroseconds
232233
* @return std::string
233234
*/
234-
std::string toCustomedFormattedStringLocal(
235+
std::string toCustomizedFormattedStringLocal(
235236
const std::string &fmtStr,
236237
bool showMicroseconds = false) const;
237238

@@ -268,9 +269,9 @@ class TRANTOR_EXPORT Date
268269
* @param str The string buffer for the generated time string.
269270
* @param len The length of the string buffer.
270271
*/
271-
void toCustomedFormattedString(const std::string &fmtStr,
272-
char *str,
273-
size_t len) const; // UTC
272+
void toCustomizedFormattedString(const std::string &fmtStr,
273+
char *str,
274+
size_t len) const; // UTC
274275

275276
/**
276277
* @brief Return true if the time point is in a same second as another.

trantor/utils/MsgBuffer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ class TRANTOR_EXPORT MsgBuffer
207207
void appendInt32(const uint32_t i);
208208

209209
/**
210-
* @brief Appaend a unsigned int64 value to the end of the buffer.
210+
* @brief Append a unsigned int64 value to the end of the buffer.
211211
*
212212
* @param l
213213
*/

trantor/utils/SerialTaskQueue.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
namespace trantor
2121
{
2222
SerialTaskQueue::SerialTaskQueue(const std::string &name)
23-
: queueName_(name.empty() ? "SerailTaskQueue" : name),
23+
: queueName_(name.empty() ? "SerialTaskQueue" : name),
2424
loopThread_(queueName_)
2525
{
2626
loopThread_.run();

trantor/utils/SerialTaskQueue.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ class TRANTOR_EXPORT SerialTaskQueue : public TaskQueue
5858
SerialTaskQueue() = delete;
5959

6060
/**
61-
* @brief Construct a new serail task queue instance.
61+
* @brief Construct a new serial task queue instance.
6262
*
6363
* @param name
6464
*/
@@ -72,7 +72,7 @@ class TRANTOR_EXPORT SerialTaskQueue : public TaskQueue
7272
* @return true
7373
* @return false
7474
*/
75-
bool isRuningTask()
75+
bool isRunningTask()
7676
{
7777
return loopThread_.getLoop()
7878
? loopThread_.getLoop()->isCallingFunctions()

trantor/utils/TaskQueue.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class TaskQueue : public NonCopyable
3636
};
3737

3838
/**
39-
* @brief Run a task in the queue sychronously. This means that the task is
39+
* @brief Run a task in the queue synchronously. This means that the task is
4040
* executed before the method returns.
4141
*
4242
* @param task

trantor/utils/Utilities.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ inline std::string fromNativePath(const std::wstring &strPath)
172172
}
173173

174174
/**
175-
* @brief Check if the name supplied by the SSL Cert matchs a FQDN
175+
* @brief Check if the name supplied by the SSL Cert matches a FQDN
176176
* @param certName The name supplied by the SSL Cert
177177
* @param hostName The FQDN to match
178178
*
@@ -243,7 +243,7 @@ inline Hash256 sha3(const std::string &str)
243243
/**
244244
* @brief Compute the BLAKE2b hash of the given data
245245
* @note When in doubt, use SHA3 or BLAKE2b. Both are safe and SHA3 is faster if
246-
* you are using OpenSSL and it has SHA3 in hardware mode. Owtherwise BLAKE2b is
246+
* you are using OpenSSL and it has SHA3 in hardware mode. Otherwise BLAKE2b is
247247
* faster in software.
248248
*/
249249
TRANTOR_EXPORT Hash256 blake2b(const void *data, size_t len);
@@ -255,7 +255,7 @@ inline Hash256 blake2b(const std::string &str)
255255
/**
256256
* @brief hex encode the given data
257257
* @note When in doubt, use SHA3 or BLAKE2b. Both are safe and SHA3 is faster if
258-
* you are using OpenSSL and it has SHA3 in hardware mode. Owtherwise BLAKE2b is
258+
* you are using OpenSSL and it has SHA3 in hardware mode. Otherwise BLAKE2b is
259259
* faster in software.
260260
*/
261261
TRANTOR_EXPORT std::string toHexString(const void *data, size_t len);
@@ -280,7 +280,7 @@ inline std::string toHexString(const Hash256 &hash)
280280
* @param size Size of the buffer
281281
* @return true if successful, false otherwise
282282
*
283-
* @note This function really sholdn't fail, but it's possible that
283+
* @note This function really shouldn't fail, but it's possible that
284284
*
285285
* - OpenSSL can't access /dev/urandom
286286
* - Compiled with glibc that supports getentropy() but the kernel doesn't

0 commit comments

Comments
 (0)