From 3818ffa7e97ed9f455968b1a97e8dae65bdba301 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 5 Aug 2026 15:54:29 +0000 Subject: [PATCH] Preview for PR #1492 a40e0aa6491a046d59a0e60bc7d161e4d7acbec4 --- .../api/latest/UConversion_8h_source.html | 23 +- .../pr-1492/api/latest/ULogger_8h_source.html | 320 +++++++++--------- preview/pr-1492/api/latest/classULogger.html | 8 +- preview/pr-1492/index.html | 2 +- 4 files changed, 185 insertions(+), 168 deletions(-) diff --git a/preview/pr-1492/api/latest/UConversion_8h_source.html b/preview/pr-1492/api/latest/UConversion_8h_source.html index 8c2074a4..2e963a74 100644 --- a/preview/pr-1492/api/latest/UConversion_8h_source.html +++ b/preview/pr-1492/api/latest/UConversion_8h_source.html @@ -177,15 +177,20 @@ $(document).ready(function(){initNavTree('UConversion_8h_source.html',''); initR
318
322std::string UTILITE_EXPORT uFormatv (const char *fmt, va_list ap);
323
-
327std::string UTILITE_EXPORT uFormat (const char *fmt, ...);
-
328
-
329#ifdef _WIN32
-
334UTILITE_EXPORT wchar_t * createWCharFromChar(const char * text);
-
335
-
340UTILITE_EXPORT char * createCharFromWChar(const wchar_t * wText);
-
341#endif
-
342
-
343#endif /* UCONVERSION_H */
+
327std::string UTILITE_EXPORT uFormat (const char *fmt, ...)
+
328#if defined(__GNUC__) || defined(__clang__)
+
329 // Compiler-checked format string (see the note on ULogger::write).
+
330 __attribute__((format(printf, 1, 2)))
+
331#endif
+
332 ;
+
333
+
334#ifdef _WIN32
+
339UTILITE_EXPORT wchar_t * createWCharFromChar(const char * text);
+
340
+
345UTILITE_EXPORT char * createCharFromWChar(const wchar_t * wText);
+
346#endif
+
347
+
348#endif /* UCONVERSION_H */
std::string UTILITE_EXPORT uBytes2Str(const std::vector< unsigned char > &bytes)
unsigned char UTILITE_EXPORT uHex2Ascii(const unsigned char &c, bool rightPart)
int UTILITE_EXPORT uStr2Int(const std::string &str)
diff --git a/preview/pr-1492/api/latest/ULogger_8h_source.html b/preview/pr-1492/api/latest/ULogger_8h_source.html index e5eb89d3..e32066b0 100644 --- a/preview/pr-1492/api/latest/ULogger_8h_source.html +++ b/preview/pr-1492/api/latest/ULogger_8h_source.html @@ -254,179 +254,191 @@ $(document).ready(function(){initNavTree('ULogger_8h_source.html',''); initResiz
392 int line,
393 const char *function,
394 const char* msg,
-
395 ...);
-
396
-
402 static int getTime(std::string &timeStr);
-
403
-
404protected:
-
405 /*
-
406 * This method is used to have a reference on the
-
407 * Logger. When no Logger exists, one is
-
408 * created. There is only one instance in the application.
-
409 * Must be protected by loggerMutex_.
-
410 * See the Singleton pattern for further explanation.
-
411 *
-
412 * @return the reference on the Logger
-
413 */
-
414 static ULogger* getInstance();
+
395 ...)
+
396#if defined(__GNUC__) || defined(__clang__)
+
397 // Let the compiler type-check every UDEBUG/UINFO/UWARN/UERROR
+
398 // format string against its arguments. Without this, a mismatch is
+
399 // invisible until the line actually executes -- and since
+
400 // ULogger::write() returns early when the message is below the
+
401 // current log level, a bad format can sit latent for years and then
+
402 // segfault only for users running at a lower level. `msg` is the
+
403 // 5th parameter (no implicit `this`: the function is static) and
+
404 // the varargs start at 6.
+
405 __attribute__((format(printf, 5, 6)))
+
406#endif
+
407 ;
+
408
+
414 static int getTime(std::string &timeStr);
415
-
416 /*
-
417 * Called only once in getInstance(). It can't be instanciated
-
418 * by the user.
-
419 *
-
420 * @see getInstance()
-
421 */
-
422 ULogger() {}
-
423
-
424 /*
-
425 * Only called by a Destroyer.
-
426 * @see Destroyer
-
427 */
-
428 virtual ~ULogger();
-
429
-
430 /*
-
431 * Flush buffered messages
-
432 */
-
433 void _flush();
-
434
-
435 /*
-
436 * A Destroyer is used to remove a dynamicaly created
-
437 * Singleton. It is friend here to have access to the
-
438 * destructor.
-
439 *
-
440 * @see Destroyer
-
441 */
-
442 friend class UDestroyer<ULogger>;
-
443
-
444 /*
-
445 * The log file name.
-
446 */
-
447 static std::string logFileName_;
-
448
-
449 /*
-
450 * Default true, it doesn't overwrite the file.
-
451 */
-
452 static bool append_;
-
453
-
454private:
-
455 /*
-
456 * Create an instance according to type. See the Abstract factory
-
457 * pattern for further explanation.
-
458 * @see type_
-
459 * @return the reference on the new logger
-
460 */
-
461 static ULogger* createInstance();
-
462
-
463 /*
-
464 * Write a message on the output with the format :
-
465 * "A message". Inherited class
-
466 * must override this method to output the message. It
-
467 * does nothing by default.
-
468 * @param msg the message to write.
-
469 * @param arg the variable arguments
-
470 */
-
471 virtual void _write(const char*, va_list) {} // Do nothing by default
-
472 virtual void _writeStr(const char*) {} // Do nothing by default
-
473
-
474private:
+
416protected:
+
417 /*
+
418 * This method is used to have a reference on the
+
419 * Logger. When no Logger exists, one is
+
420 * created. There is only one instance in the application.
+
421 * Must be protected by loggerMutex_.
+
422 * See the Singleton pattern for further explanation.
+
423 *
+
424 * @return the reference on the Logger
+
425 */
+
426 static ULogger* getInstance();
+
427
+
428 /*
+
429 * Called only once in getInstance(). It can't be instanciated
+
430 * by the user.
+
431 *
+
432 * @see getInstance()
+
433 */
+
434 ULogger() {}
+
435
+
436 /*
+
437 * Only called by a Destroyer.
+
438 * @see Destroyer
+
439 */
+
440 virtual ~ULogger();
+
441
+
442 /*
+
443 * Flush buffered messages
+
444 */
+
445 void _flush();
+
446
+
447 /*
+
448 * A Destroyer is used to remove a dynamicaly created
+
449 * Singleton. It is friend here to have access to the
+
450 * destructor.
+
451 *
+
452 * @see Destroyer
+
453 */
+
454 friend class UDestroyer<ULogger>;
+
455
+
456 /*
+
457 * The log file name.
+
458 */
+
459 static std::string logFileName_;
+
460
+
461 /*
+
462 * Default true, it doesn't overwrite the file.
+
463 */
+
464 static bool append_;
+
465
+
466private:
+
467 /*
+
468 * Create an instance according to type. See the Abstract factory
+
469 * pattern for further explanation.
+
470 * @see type_
+
471 * @return the reference on the new logger
+
472 */
+
473 static ULogger* createInstance();
+
474
475 /*
-
476 * The Logger instance pointer.
-
477 */
-
478 static ULogger* instance_;
-
479
-
480 /*
-
481 * The Logger's destroyer
+
476 * Write a message on the output with the format :
+
477 * "A message". Inherited class
+
478 * must override this method to output the message. It
+
479 * does nothing by default.
+
480 * @param msg the message to write.
+
481 * @param arg the variable arguments
482 */
-
483 static UDestroyer<ULogger> destroyer_;
-
484
-
485 /*
-
486 * If the logger prints the time for each message.
-
487 * Default is true.
-
488 */
-
489 static bool printTime_;
-
490
-
491 /*
-
492 * If the logger prints the level for each message.
-
493 * Default is true.
+
483 virtual void _write(const char*, va_list) {} // Do nothing by default
+
484 virtual void _writeStr(const char*) {} // Do nothing by default
+
485
+
486private:
+
487 /*
+
488 * The Logger instance pointer.
+
489 */
+
490 static ULogger* instance_;
+
491
+
492 /*
+
493 * The Logger's destroyer
494 */
-
495 static bool printLevel_;
+
495 static UDestroyer<ULogger> destroyer_;
496
497 /*
-
498 * If the logger prints the end line for each message.
+
498 * If the logger prints the time for each message.
499 * Default is true.
500 */
-
501 static bool printEndline_;
+
501 static bool printTime_;
502
503 /*
-
504 * If the logger prints text with color.
-
505 * Default is true.
-
506 */
-
507 static bool printColored_;
+
504 * If the logger prints the level for each message.
+
505 * Default is true.
+
506 */
+
507 static bool printLevel_;
508
509 /*
-
510 * If the logger prints where the message is logged (fileName::function():line).
-
511 * Default is true.
-
512 */
-
513 static bool printWhere_;
+
510 * If the logger prints the end line for each message.
+
511 * Default is true.
+
512 */
+
513 static bool printEndline_;
514
515 /*
-
516 * If the logger prints the full path of the source file
-
517 * where the message is written. Only works when
-
518 * "printWhere_" is true.
-
519 * Default is false.
-
520 */
-
521 static bool printWhereFullPath_;
-
522
-
523 /*
-
524 * If the logger prints the thread ID.
-
525 * Default is false.
-
526 */
-
527 static bool printThreadID_;
-
528
-
529 /*
-
530 * If the logger limit the size of the "where" path to
-
531 * characters. If the path is over 8 characters, a "~"
-
532 * is added. Only works when "printWhereFullPath_" is false.
-
533 * Default is false.
-
534 */
-
535 static bool limitWhereLength_;
-
536
-
537 /*
-
538 * The type of the logger.
-
539 */
-
540 static Type type_;
-
541
-
542 /*
-
543 * The severity of the log.
-
544 */
-
545 static Level level_;
-
546
-
547 /*
-
548 * The severity at which the message is also sent in a ULogEvent.
-
549 */
-
550 static Level eventLevel_;
-
551
-
552 static const char * levelName_[5];
+
516 * If the logger prints text with color.
+
517 * Default is true.
+
518 */
+
519 static bool printColored_;
+
520
+
521 /*
+
522 * If the logger prints where the message is logged (fileName::function():line).
+
523 * Default is true.
+
524 */
+
525 static bool printWhere_;
+
526
+
527 /*
+
528 * If the logger prints the full path of the source file
+
529 * where the message is written. Only works when
+
530 * "printWhere_" is true.
+
531 * Default is false.
+
532 */
+
533 static bool printWhereFullPath_;
+
534
+
535 /*
+
536 * If the logger prints the thread ID.
+
537 * Default is false.
+
538 */
+
539 static bool printThreadID_;
+
540
+
541 /*
+
542 * If the logger limit the size of the "where" path to
+
543 * characters. If the path is over 8 characters, a "~"
+
544 * is added. Only works when "printWhereFullPath_" is false.
+
545 * Default is false.
+
546 */
+
547 static bool limitWhereLength_;
+
548
+
549 /*
+
550 * The type of the logger.
+
551 */
+
552 static Type type_;
553
554 /*
-
555 * Mutex used when accessing public functions.
-
556 */
-
557 static UMutex loggerMutex_;
+
555 * The severity of the log.
+
556 */
+
557 static Level level_;
558
559 /*
-
560 * If the logger prints messages only when ULogger::flush() is called.
-
561 * Default is false.
-
562 */
-
563 static bool buffered_;
-
564
-
565 static std::string bufferedMsgs_;
-
566
-
567 static std::set<unsigned long> threadIdFilter_;
-
568 static std::map<std::string, unsigned long> registeredThreads_;
-
569};
- +
560 * The severity at which the message is also sent in a ULogEvent.
+
561 */
+
562 static Level eventLevel_;
+
563
+
564 static const char * levelName_[5];
+
565
+
566 /*
+
567 * Mutex used when accessing public functions.
+
568 */
+
569 static UMutex loggerMutex_;
570
-
571#endif // ULOGGER_H
+
571 /*
+
572 * If the logger prints messages only when ULogger::flush() is called.
+
573 * Default is false.
+
574 */
+
575 static bool buffered_;
+
576
+
577 static std::string bufferedMsgs_;
+
578
+
579 static std::set<unsigned long> threadIdFilter_;
+
580 static std::map<std::string, unsigned long> registeredThreads_;
+
581};
+ +
582
+
583#endif // ULOGGER_H
Definition UDestroyer.h:33
Definition UEvent.h:57
Definition ULogger.h:122
diff --git a/preview/pr-1492/api/latest/classULogger.html b/preview/pr-1492/api/latest/classULogger.html index 7dd61f51..d656cfbc 100644 --- a/preview/pr-1492/api/latest/classULogger.html +++ b/preview/pr-1492/api/latest/classULogger.html @@ -355,7 +355,7 @@ Friends
-

Definition at line 422 of file ULogger.h.

+

Definition at line 434 of file ULogger.h.

@@ -1242,7 +1242,7 @@ setExitLevel()
-

Definition at line 433 of file ULogger.h.

+

Definition at line 445 of file ULogger.h.

@@ -1292,7 +1292,7 @@ setExitLevel()
-

Definition at line 447 of file ULogger.h.

+

Definition at line 459 of file ULogger.h.

@@ -1316,7 +1316,7 @@ setExitLevel()
-

Definition at line 452 of file ULogger.h.

+

Definition at line 464 of file ULogger.h.

diff --git a/preview/pr-1492/index.html b/preview/pr-1492/index.html index 3da081cc..96fc698a 100644 --- a/preview/pr-1492/index.html +++ b/preview/pr-1492/index.html @@ -5,7 +5,7 @@ - + RTAB-Map | Real-Time Appearance-Based Mapping