Skip to content

Commit 7c818f9

Browse files
authored
Merge pull request #14 from sy-c/master
renamed member variable
2 parents 81fd6d7 + 4c58089 commit 7c818f9

File tree

2 files changed

+24
-24
lines changed

2 files changed

+24
-24
lines changed

include/InfoLogger/InfoLogger.hxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ class InfoLogger
286286

287287
private:
288288
class Impl; // private class for implementation
289-
std::unique_ptr<Impl> pImpl; // handle to private class instance at runtime
289+
std::unique_ptr<Impl> mPimpl; // handle to private class instance at runtime
290290
};
291291

292292

src/InfoLogger.cxx

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -422,14 +422,14 @@ int InfoLogger::Impl::logV(const InfoLoggerMessageOption &options, const InfoLog
422422

423423
InfoLogger::InfoLogger()
424424
{
425-
pImpl=std::make_unique<InfoLogger::Impl>();
426-
if (pImpl==NULL) { throw __LINE__; }
425+
mPimpl=std::make_unique<InfoLogger::Impl>();
426+
if (mPimpl==NULL) { throw __LINE__; }
427427
}
428428

429429

430430
InfoLogger::~InfoLogger()
431431
{
432-
// pImpl is automatically destroyed
432+
// mPimpl is automatically destroyed
433433
}
434434

435435
int InfoLogger::logInfo(const std::string &message) {
@@ -466,8 +466,8 @@ int InfoLogger::log(Severity severity, const char *message, ...)
466466

467467

468468
int InfoLogger::logV(Severity severity, const char *message, va_list ap) {
469-
if (pImpl->magicTag != InfoLoggerMagicNumber) { return __LINE__; }
470-
return pImpl->logV(severity, message, ap);
469+
if (mPimpl->magicTag != InfoLoggerMagicNumber) { return __LINE__; }
470+
return mPimpl->logV(severity, message, ap);
471471
}
472472

473473

@@ -496,50 +496,50 @@ int InfoLogger::log(Severity severity, int level, int errorCode, const char * so
496496
497497
int InfoLogger::logV(Severity severity, int level, int errorCode, const char * sourceFile, int sourceLine, const InfoLoggerContext& context, const char *message, va_list ap)
498498
{
499-
if (pImpl->magicTag != InfoLoggerMagicNumber) { return __LINE__; }
500-
return pImpl->logV(severity, message, ap);
499+
if (mPimpl->magicTag != InfoLoggerMagicNumber) { return __LINE__; }
500+
return mPimpl->logV(severity, message, ap);
501501
}
502502
*/
503503

504504
int InfoLogger::setContext(const InfoLoggerContext &context)
505505
{
506-
if (pImpl->magicTag != InfoLoggerMagicNumber) { return __LINE__; }
507-
pImpl->currentContext=context;
508-
pImpl->refreshDefaultMsg();
506+
if (mPimpl->magicTag != InfoLoggerMagicNumber) { return __LINE__; }
507+
mPimpl->currentContext=context;
508+
mPimpl->refreshDefaultMsg();
509509
return 0;
510510
}
511511

512512
int InfoLogger::unsetContext()
513513
{
514-
if (pImpl->magicTag != InfoLoggerMagicNumber) { return __LINE__; }
515-
pImpl->currentContext.reset();
516-
pImpl->refreshDefaultMsg();
514+
if (mPimpl->magicTag != InfoLoggerMagicNumber) { return __LINE__; }
515+
mPimpl->currentContext.reset();
516+
mPimpl->refreshDefaultMsg();
517517
return 0;
518518
}
519519

520520

521521

522522

523523
int InfoLogger::log(const InfoLoggerMessageOption &options, const InfoLoggerContext& context, const char *message, ...) {
524-
if (pImpl->magicTag != InfoLoggerMagicNumber) { return __LINE__; }
524+
if (mPimpl->magicTag != InfoLoggerMagicNumber) { return __LINE__; }
525525

526526
// forward variable list of arguments to logV method
527527
int err;
528528
va_list ap;
529529
va_start(ap, message);
530-
err = pImpl->logV(options, context, message, ap);
530+
err = mPimpl->logV(options, context, message, ap);
531531
va_end(ap);
532532
return err;
533533
}
534534

535535
int InfoLogger::log(const InfoLoggerMessageOption &options, const char *message, ...) {
536-
if (pImpl->magicTag != InfoLoggerMagicNumber) { return __LINE__; }
536+
if (mPimpl->magicTag != InfoLoggerMagicNumber) { return __LINE__; }
537537

538538
// forward variable list of arguments to logV method
539539
int err;
540540
va_list ap;
541541
va_start(ap, message);
542-
err = pImpl->logV(options, pImpl->currentContext, message, ap);
542+
err = mPimpl->logV(options, mPimpl->currentContext, message, ap);
543543
va_end(ap);
544544
return err;
545545
}
@@ -549,7 +549,7 @@ int InfoLogger::log(const InfoLoggerMessageOption &options, const char *message,
549549
InfoLogger &InfoLogger::operator<<(const std::string &message)
550550
{
551551
// store data in internal variable
552-
pImpl->currentStreamMessage.append(message);
552+
mPimpl->currentStreamMessage.append(message);
553553
return *this;
554554
}
555555

@@ -559,22 +559,22 @@ InfoLogger &InfoLogger::operator<<(InfoLogger::StreamOps op)
559559

560560
// end of message: flush current buffer in a single message
561561
if (op == endm) {
562-
log(pImpl->currentStreamOptions, "%s", pImpl->currentStreamMessage.c_str());
563-
pImpl->currentStreamMessage.clear();
564-
pImpl->currentStreamOptions=undefinedMessageOption;
562+
log(mPimpl->currentStreamOptions, "%s", mPimpl->currentStreamMessage.c_str());
563+
mPimpl->currentStreamMessage.clear();
564+
mPimpl->currentStreamOptions=undefinedMessageOption;
565565
}
566566
return *this;
567567
}
568568

569569
InfoLogger &InfoLogger::operator<<(const InfoLogger::Severity severity)
570570
{
571-
pImpl->currentStreamOptions.severity=severity;
571+
mPimpl->currentStreamOptions.severity=severity;
572572
return *this;
573573
}
574574

575575
InfoLogger &InfoLogger::operator<<(const InfoLogger::InfoLoggerMessageOption options)
576576
{
577-
pImpl->currentStreamOptions=options;
577+
mPimpl->currentStreamOptions=options;
578578
return *this;
579579
}
580580

0 commit comments

Comments
 (0)