Some minor cleanup. I'm basically nitpicking at this point.

This commit is contained in:
Jacob 2024-05-16 10:59:59 +02:00
parent 3e7a63e282
commit 3449a39154
2 changed files with 11 additions and 10 deletions

View file

@ -1,8 +1,8 @@
/**
/*
* docpp - C++ library for generating XML, HTML and CSS.
* Licensed under the LGPL-3.0-or-later license.
*
* Author: speedie <speedie@speedie.site>
* SPDX-License-Identifier: LGPL-3.0-or-later
* Copyright (c) 2024 speedie <speedie@speedie.site>
*/
#pragma once
@ -10,6 +10,8 @@
#include <vector>
#include <unordered_map>
#include <map>
#include <exception>
#include <utility>
/**
* @brief A namespace to represent HTML elements and documents
@ -1269,5 +1271,5 @@ namespace docpp {
void operator+=(const Element& element);
Element operator[](const int& index) const;
};
}
}
} // namespace CSS
} // namespace docpp

View file

@ -1,8 +1,8 @@
/**
/*
* docpp - C++ library for generating XML, HTML and CSS.
* Licensed under the LGPL-3.0-or-later license.
*
* Author: speedie <speedie@speedie.site>
* SPDX-License-Identifier: LGPL-3.0-or-later
* Copyright (c) 2024 speedie <speedie@speedie.site>
*/
#include <include/docpp.hpp>
@ -290,8 +290,7 @@ void docpp::HTML::Section::set(const std::string& tag, const Properties& propert
}
std::pair<std::string, docpp::HTML::Type> docpp::HTML::resolve_tag(const Tag tag) {
std::unordered_map<Tag, std::pair<std::string, docpp::HTML::Type>> tag_map{
static const std::unordered_map<const Tag, const std::pair<const std::string, const docpp::HTML::Type>> tag_map{
{ELEMENT_EMPTY, {"", docpp::HTML::TYPE_NON_SELF_CLOSING}},
{ELEMENT_ABBREVIATION, {"abbr", docpp::HTML::TYPE_NON_SELF_CLOSING}},
{ELEMENT_ABBR, {"abbr", docpp::HTML::TYPE_NON_SELF_CLOSING}},