Fixed formatting
This commit is contained in:
@@ -569,7 +569,6 @@ template <typename C, typename D> void generator<C, D>::init_env()
|
|||||||
auto element_opt = m_model.get_with_namespace(
|
auto element_opt = m_model.get_with_namespace(
|
||||||
args[0]->get<std::string>(), m_config.using_namespace());
|
args[0]->get<std::string>(), m_config.using_namespace());
|
||||||
|
|
||||||
|
|
||||||
if (!element_opt.has_value())
|
if (!element_opt.has_value())
|
||||||
throw clanguml::error::uml_alias_missing(
|
throw clanguml::error::uml_alias_missing(
|
||||||
args[0]->get<std::string>());
|
args[0]->get<std::string>());
|
||||||
|
|||||||
@@ -140,7 +140,8 @@ diagram::files() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
common::optional_ref<clanguml::common::model::diagram_element>
|
common::optional_ref<clanguml::common::model::diagram_element>
|
||||||
diagram::get_with_namespace(const std::string &name, const common::model::namespace_ &ns) const
|
diagram::get_with_namespace(
|
||||||
|
const std::string &name, const common::model::namespace_ &ns) const
|
||||||
{
|
{
|
||||||
// Convert to preferred OS path
|
// Convert to preferred OS path
|
||||||
std::filesystem::path namePath{name};
|
std::filesystem::path namePath{name};
|
||||||
|
|||||||
@@ -60,7 +60,8 @@ public:
|
|||||||
const common::reference_vector<common::model::source_file> &files() const;
|
const common::reference_vector<common::model::source_file> &files() const;
|
||||||
|
|
||||||
common::optional_ref<clanguml::common::model::diagram_element>
|
common::optional_ref<clanguml::common::model::diagram_element>
|
||||||
get_with_namespace(const std::string &name, const common::model::namespace_ &ns) const override;
|
get_with_namespace(const std::string &name,
|
||||||
|
const common::model::namespace_ &ns) const override;
|
||||||
|
|
||||||
inja::json context() const override;
|
inja::json context() const override;
|
||||||
|
|
||||||
|
|||||||
@@ -303,7 +303,8 @@ std::size_t hash_seed(std::size_t seed)
|
|||||||
return kSeedStart + (seed << kSeedShiftFirst) + (seed >> kSeedShiftSecond);
|
return kSeedStart + (seed << kSeedShiftFirst) + (seed >> kSeedShiftSecond);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string path_to_url(const std::filesystem::path& p) {
|
std::string path_to_url(const std::filesystem::path &p)
|
||||||
|
{
|
||||||
std::vector<std::string> path_tokens;
|
std::vector<std::string> path_tokens;
|
||||||
auto it = p.begin();
|
auto it = p.begin();
|
||||||
if (p.has_root_directory())
|
if (p.has_root_directory())
|
||||||
@@ -316,7 +317,6 @@ std::string path_to_url(const std::filesystem::path& p) {
|
|||||||
return fmt::format("/{}", fmt::join(path_tokens, "/"));
|
return fmt::format("/{}", fmt::join(path_tokens, "/"));
|
||||||
else
|
else
|
||||||
return fmt::format("{}", fmt::join(path_tokens, "/"));
|
return fmt::format("{}", fmt::join(path_tokens, "/"));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace clanguml::util
|
} // namespace clanguml::util
|
||||||
|
|||||||
@@ -21,7 +21,6 @@
|
|||||||
|
|
||||||
#include "common/model/namespace.h"
|
#include "common/model/namespace.h"
|
||||||
|
|
||||||
|
|
||||||
TEST_CASE("Test namespace_", "[unit-test]")
|
TEST_CASE("Test namespace_", "[unit-test]")
|
||||||
{
|
{
|
||||||
using clanguml::common::model::namespace_;
|
using clanguml::common::model::namespace_;
|
||||||
|
|||||||
Reference in New Issue
Block a user