forked from external-repos/esp32cam-rtsp
Fixed template typo
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include <Wstring.h>
|
||||
#include <Arduino.h>
|
||||
|
||||
typedef struct
|
||||
{
|
||||
@@ -8,12 +8,12 @@ typedef struct
|
||||
const String value;
|
||||
} template_substitution_t;
|
||||
|
||||
template<typename T, size_t n>
|
||||
template <typename T, size_t n>
|
||||
inline String template_render(const char *format, T (&values)[n])
|
||||
{
|
||||
auto s = String(format);
|
||||
for (size_t i=0; i<n; i++)
|
||||
s.replace("{{" + String(values[n].key) + "}}", values[n].value);
|
||||
for (size_t i = 0; i < n; i++)
|
||||
s.replace("{{" + String(values[i].key) + "}}", values[i].value);
|
||||
|
||||
return s;
|
||||
}
|
||||
Reference in New Issue
Block a user