31 |
31 |
32 #include "stringClass.h" |
32 #include "stringClass.h" |
33 #include "list.h" |
33 #include "list.h" |
34 #include "enumstrings.h" |
34 #include "enumstrings.h" |
35 |
35 |
36 String MakeFormatArgument (const String& a) |
36 inline String MakeFormatArgument (const String& a) |
37 { |
37 { |
38 return a; |
38 return a; |
39 } |
39 } |
40 |
40 |
41 String MakeFormatArgument (char a) |
41 inline String MakeFormatArgument (char a) |
42 { |
42 { |
43 return String (a); |
43 return String (a); |
44 } |
44 } |
45 |
45 |
46 String MakeFormatArgument (int a) |
46 inline String MakeFormatArgument (int a) |
47 { |
47 { |
48 return String::fromNumber (a); |
48 return String::fromNumber (a); |
49 } |
49 } |
50 |
50 |
51 String MakeFormatArgument (long a) |
51 inline String MakeFormatArgument (long a) |
52 { |
52 { |
53 return String::fromNumber (a); |
53 return String::fromNumber (a); |
54 } |
54 } |
55 |
55 |
56 String MakeFormatArgument (size_t a) |
56 inline String MakeFormatArgument (size_t a) |
57 { |
57 { |
58 return String::fromNumber (long (a)); |
58 return String::fromNumber (long (a)); |
59 } |
59 } |
60 |
60 |
61 String MakeFormatArgument (const char* a) |
61 inline String MakeFormatArgument (const char* a) |
62 { |
62 { |
63 return a; |
63 return a; |
64 } |
64 } |
65 |
65 |
66 String MakeFormatArgument (const void* a) |
66 inline String MakeFormatArgument (const void* a) |
67 { |
67 { |
68 String text; |
68 String text; |
69 text.sprintf ("%p", a); |
69 text.sprintf ("%p", a); |
70 return text; |
70 return text; |
71 } |
71 } |
72 |
72 |
73 String MakeFormatArgument (std::nullptr_t) |
73 inline String MakeFormatArgument (std::nullptr_t) |
74 { |
74 { |
75 return "(nullptr)"; |
75 return "(nullptr)"; |
76 } |
76 } |
77 |
77 |
78 template<class T> |
78 template<class T> |
79 String MakeFormatArgument (List<T> const& list) |
79 inline String MakeFormatArgument (List<T> const& list) |
80 { |
80 { |
81 String result; |
81 String result; |
82 |
82 |
83 if (list.isEmpty()) |
83 if (list.isEmpty()) |
84 return "{}"; |
84 return "{}"; |