Skip to content

Commit 4b86a7c

Browse files
authored
apply llvm-header-guard, llvm-namespaces (#218)
run clang-tidy checks llvm-header-guard, llvm-namespaces to update code style
1 parent dae174c commit 4b86a7c

34 files changed

+140
-135
lines changed

include/jinja2cpp/error_info.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,6 @@ using ErrorInfoW = ErrorInfoTpl<wchar_t>;
180180

181181
JINJA2CPP_EXPORT std::ostream& operator<<(std::ostream& os, const ErrorInfo& res);
182182
JINJA2CPP_EXPORT std::wostream& operator<<(std::wostream& os, const ErrorInfoW& res);
183-
} // jinja2
183+
} // namespace jinja2
184184

185185
#endif // JINJA2CPP_ERROR_INFO_H

include/jinja2cpp/filesystem_handler.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,6 @@ class JINJA2CPP_EXPORT RealFileSystem : public IFilesystemHandler
171171
private:
172172
std::string m_rootFolder;
173173
};
174-
} // jinja2
174+
} // namespace jinja2
175175

176-
#endif // FILESYSTEM_HANDLER_H
176+
#endif // JINJA2CPP_FILESYSTEM_HANDLER_H

include/jinja2cpp/generic_list.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
#ifndef JINJA2_GENERIC_LIST_H
2-
#define JINJA2_GENERIC_LIST_H
1+
#ifndef JINJA2CPP_GENERIC_LIST_H
2+
#define JINJA2CPP_GENERIC_LIST_H
33

44
#include <nonstd/optional.hpp>
55

@@ -157,7 +157,7 @@ struct ListItemAccessor
157157
namespace detail
158158
{
159159
class GenericListIterator;
160-
}
160+
} // namespace detail
161161

162162
/*!
163163
* \brief Facade class for generic lists
@@ -265,7 +265,7 @@ inline ListEnumeratorPtr ListItemAccessor::MakeEnumerator(Args&& ...args)
265265
{
266266
return ListEnumeratorPtr(new T(std::forward<Args>(args)...), [](ListEnumerator* e) { delete e; });
267267
}
268-
}
268+
} // namespace jinja2
269269

270270

271-
#endif // JINJA2_GENERIC_LIST_H
271+
#endif // JINJA2CPP_GENERIC_LIST_H

include/jinja2cpp/generic_list_impl.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ auto MakeGeneratedList(ListGenerator&& fn)
343343
{
344344
return GenericList([accessor = GeneratedListAccessor(std::move(fn))]() {return &accessor;});
345345
}
346-
}
346+
} // namespace lists_impl
347347

348348
/*!
349349
* \brief Create instance of the GenericList from the pair of iterators
@@ -385,6 +385,6 @@ auto MakeGenericList(lists_impl::ListGenerator fn)
385385
return lists_impl::MakeGeneratedList(std::move(fn));
386386
}
387387

388-
}
388+
} // namespace jinja2
389389

390-
#endif //JINJA2CPP_GENERIC_LIST_IMPL_H
390+
#endif // JINJA2CPP_GENERIC_LIST_IMPL_H

include/jinja2cpp/generic_list_iterator.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
#ifndef JINJA2_GENERIC_LIST_ITERATOR_H
2-
#define JINJA2_GENERIC_LIST_ITERATOR_H
1+
#ifndef JINJA2CPP_GENERIC_LIST_ITERATOR_H
2+
#define JINJA2CPP_GENERIC_LIST_ITERATOR_H
33

44
#include "generic_list.h"
55
#include "value.h"
@@ -94,7 +94,7 @@ class GenericListIterator
9494
Value m_current;
9595
};
9696

97-
}
97+
} // namespace detail
9898

9999
inline detail::GenericListIterator GenericList::begin() const
100100
{
@@ -108,6 +108,6 @@ inline detail::GenericListIterator GenericList::end() const
108108

109109
inline auto GenericList::cbegin() const {return begin();}
110110
inline auto GenericList::cend() const {return end();}
111-
}
111+
} // namespace jinja2
112112

113-
#endif // JINJA2_GENERIC_LIST_ITERATOR_H
113+
#endif // JINJA2CPP_GENERIC_LIST_ITERATOR_H

include/jinja2cpp/reflected_value.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
#ifndef JINJA2_REFLECTED_VALUE_H
2-
#define JINJA2_REFLECTED_VALUE_H
1+
#ifndef JINJA2CPP_REFLECTED_VALUE_H
2+
#define JINJA2CPP_REFLECTED_VALUE_H
33

44
#include "value.h"
55

@@ -522,7 +522,7 @@ JINJA2_INT_REFLECTOR(int32_t);
522522
JINJA2_INT_REFLECTOR(uint32_t);
523523
JINJA2_INT_REFLECTOR(int64_t);
524524
JINJA2_INT_REFLECTOR(uint64_t);
525-
} // detail
525+
} // namespace detail
526526
#endif
527527

528528
template<typename T>
@@ -531,6 +531,6 @@ Value Reflect(T&& val)
531531
return detail::Reflector<T>::Create(std::forward<T>(val));
532532
}
533533

534-
} // jinja2
534+
} // namespace jinja2
535535

536-
#endif // JINJA2_REFLECTED_VALUE_H
536+
#endif // JINJA2CPP_REFLECTED_VALUE_H

include/jinja2cpp/string_helpers.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
#ifndef JINJA2_STRING_HELPERS_H
2-
#define JINJA2_STRING_HELPERS_H
1+
#ifndef JINJA2CPP_STRING_HELPERS_H
2+
#define JINJA2CPP_STRING_HELPERS_H
33

44
#include <nonstd/string_view.hpp>
55
#include "value.h"
@@ -98,7 +98,7 @@ namespace detail
9898
template<typename CharT, typename T>
9999
struct StringConverter<nonstd::basic_string_view<CharT>, T> : public StringConverter<std::basic_string<CharT>, T> {};
100100

101-
} // detail
101+
} // namespace detail
102102

103103
/*!
104104
* \brief Convert string objects from one representation or another
@@ -261,7 +261,7 @@ struct WStringGetter
261261
return std::wstring();
262262
}
263263
};
264-
}
264+
} // namespace detail
265265
/*!
266266
* \brief Gets std::string from the arbitrary \ref Value
267267
*
@@ -290,6 +290,6 @@ inline std::wstring AsWString(const Value& val)
290290
{
291291
return nonstd::visit(detail::WStringGetter(), val.data());
292292
}
293-
}
293+
} // namespace jinja2
294294

295-
#endif // JINJA2_STRING_HELPERS_H
295+
#endif // JINJA2CPP_STRING_HELPERS_H

include/jinja2cpp/template.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
#ifndef JINJA2_TEMPLATE_H
2-
#define JINJA2_TEMPLATE_H
1+
#ifndef JINJA2CPP_TEMPLATE_H
2+
#define JINJA2CPP_TEMPLATE_H
33

44
#include "config.h"
55
#include "error_info.h"
@@ -279,6 +279,6 @@ class JINJA2CPP_EXPORT TemplateW
279279
std::shared_ptr<ITemplateImpl> m_impl;
280280
friend class TemplateImpl<wchar_t>;
281281
};
282-
} // jinja2
282+
} // namespace jinja2
283283

284-
#endif // JINJA2_TEMPLATE_H
284+
#endif // JINJA2CPP_TEMPLATE_H

include/jinja2cpp/template_env.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,6 @@ class JINJA2CPP_EXPORT TemplateEnv
242242
std::unordered_map<std::string, TemplateWCacheEntry> m_templateWCache;
243243
};
244244

245-
} // jinja2
245+
} // namespace jinja2
246246

247247
#endif // JINJA2CPP_TEMPLATE_ENV_H

include/jinja2cpp/user_callable.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
#ifndef USER_CALLABLE_H
2-
#define USER_CALLABLE_H
1+
#ifndef JINJA2CPP_USER_CALLABLE_H
2+
#define JINJA2CPP_USER_CALLABLE_H
33

44
#include "string_helpers.h"
55
#include "value.h"
@@ -340,7 +340,7 @@ template<typename... T>
340340
struct ArgDescrHasType<ArgInfoT<T>...> : std::true_type
341341
{
342342
};
343-
} // detail
343+
} // namespace detail
344344
#endif // JINJA2CPP_NO_DOXYGEN
345345

346346
/*!
@@ -431,6 +431,6 @@ auto MakeCallable(Fn&& f)
431431
{
432432
return UserCallable{ [=, fn = std::forward<Fn>(f)](const UserCallableParams&) { return fn(); }, {} };
433433
}
434-
} // jinja2
434+
} // namespace jinja2
435435

436-
#endif // USER_CALLABLE_H
436+
#endif // JINJA2CPP_USER_CALLABLE_H

0 commit comments

Comments
 (0)