time_format: add `noexcept`
authorMax Kellermann <max@musicpd.org>
Tue, 10 Sep 2019 07:51:35 +0000 (09:51 +0200)
committerMax Kellermann <max@musicpd.org>
Tue, 10 Sep 2019 07:51:35 +0000 (09:51 +0200)
src/time_format.cxx
src/time_format.hxx

index 239faa1..4721933 100644 (file)
@@ -23,7 +23,7 @@
 #include <stdio.h>
 
 void
-format_duration_short(char *buffer, size_t length, unsigned duration)
+format_duration_short(char *buffer, size_t length, unsigned duration) noexcept
 {
        if (duration < 3600)
                snprintf(buffer, length,
@@ -35,7 +35,7 @@ format_duration_short(char *buffer, size_t length, unsigned duration)
 }
 
 void
-format_duration_long(char *p, size_t length, unsigned long duration)
+format_duration_long(char *p, size_t length, unsigned long duration) noexcept
 {
        unsigned bytes_written = 0;
 
index bdec4e1..69b3a29 100644 (file)
@@ -23,9 +23,9 @@
 #include <stddef.h>
 
 void
-format_duration_short(char *buffer, size_t length, unsigned duration);
+format_duration_short(char *buffer, size_t length, unsigned duration) noexcept;
 
 void
-format_duration_long(char *buffer, size_t length, unsigned long duration);
+format_duration_long(char *buffer, size_t length, unsigned long duration) noexcept;
 
 #endif