diff options
| author | Cengizhan Pasaoglu <cengizhanpasaoglu@gmail.com> | 2020-10-09 08:31:21 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-10-08 22:31:21 -0700 |
| commit | 0dcc11ac2212941212540e379dfdf8d73f77d461 (patch) | |
| tree | f4215f88a88ed39cf868ebf18f0dfa0a60d3337c /toolsrc/include | |
| parent | d1929059861f183ec8c50dc114442a08aa7b2e8d (diff) | |
| download | vcpkg-0dcc11ac2212941212540e379dfdf8d73f77d461.tar.gz vcpkg-0dcc11ac2212941212540e379dfdf8d73f77d461.zip | |
[vcpkg] Use more forward declarations rather than definitions (#13623)
Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com>
Diffstat (limited to 'toolsrc/include')
| -rw-r--r-- | toolsrc/include/vcpkg/base/json.h | 2 | ||||
| -rw-r--r-- | toolsrc/include/vcpkg/build.h | 11 | ||||
| -rw-r--r-- | toolsrc/include/vcpkg/cmakevars.h | 6 | ||||
| -rw-r--r-- | toolsrc/include/vcpkg/commands.h | 1 | ||||
| -rw-r--r-- | toolsrc/include/vcpkg/dependencies.h | 13 | ||||
| -rw-r--r-- | toolsrc/include/vcpkg/export.chocolatey.h | 3 | ||||
| -rw-r--r-- | toolsrc/include/vcpkg/export.prefab.h | 3 | ||||
| -rw-r--r-- | toolsrc/include/vcpkg/fwd/build.h | 7 | ||||
| -rw-r--r-- | toolsrc/include/vcpkg/fwd/cmakevars.h | 6 | ||||
| -rw-r--r-- | toolsrc/include/vcpkg/fwd/dependencies.h | 7 | ||||
| -rw-r--r-- | toolsrc/include/vcpkg/fwd/portfileprovider.h | 7 | ||||
| -rw-r--r-- | toolsrc/include/vcpkg/portfileprovider.h | 3 | ||||
| -rw-r--r-- | toolsrc/include/vcpkg/postbuildlint.h | 12 | ||||
| -rw-r--r-- | toolsrc/include/vcpkg/registries.h | 4 | ||||
| -rw-r--r-- | toolsrc/include/vcpkg/remove.h | 5 | ||||
| -rw-r--r-- | toolsrc/include/vcpkg/triplet.h | 3 | ||||
| -rw-r--r-- | toolsrc/include/vcpkg/update.h | 11 |
17 files changed, 68 insertions, 36 deletions
diff --git a/toolsrc/include/vcpkg/base/json.h b/toolsrc/include/vcpkg/base/json.h index 66d147918..a16e9ed82 100644 --- a/toolsrc/include/vcpkg/base/json.h +++ b/toolsrc/include/vcpkg/base/json.h @@ -480,7 +480,7 @@ namespace vcpkg::Json m_path.push_back(key); auto res = internal_visit(value, visitor); m_path.pop_back(); - return std::move(res); + return res; } template<class Type> Optional<Type> visit_map_field(StringView key, const Value& value, IDeserializer<Type>&& visitor) diff --git a/toolsrc/include/vcpkg/build.h b/toolsrc/include/vcpkg/build.h index 443bcd3a2..4a3b39638 100644 --- a/toolsrc/include/vcpkg/build.h +++ b/toolsrc/include/vcpkg/build.h @@ -1,11 +1,14 @@ #pragma once +#include <vcpkg/fwd/cmakevars.h> +#include <vcpkg/fwd/dependencies.h> +#include <vcpkg/fwd/portfileprovider.h> + #include <vcpkg/base/cstringview.h> #include <vcpkg/base/files.h> #include <vcpkg/base/optional.h> #include <vcpkg/base/system.process.h> -#include <vcpkg/cmakevars.h> #include <vcpkg/commands.integrate.h> #include <vcpkg/packagespec.h> #include <vcpkg/statusparagraphs.h> @@ -23,12 +26,6 @@ namespace vcpkg struct IBinaryProvider; } -namespace vcpkg::Dependencies -{ - struct InstallPlanAction; - struct ActionPlan; -} - namespace vcpkg::System { struct Environment; diff --git a/toolsrc/include/vcpkg/cmakevars.h b/toolsrc/include/vcpkg/cmakevars.h index 66dd287b8..e92f50ab2 100644 --- a/toolsrc/include/vcpkg/cmakevars.h +++ b/toolsrc/include/vcpkg/cmakevars.h @@ -1,16 +1,12 @@ #pragma once +#include <vcpkg/fwd/dependencies.h> #include <vcpkg/fwd/vcpkgpaths.h> #include <vcpkg/base/optional.h> #include <vcpkg/portfileprovider.h> -namespace vcpkg::Dependencies -{ - struct ActionPlan; -} - namespace vcpkg::CMakeVars { struct CMakeVarProvider diff --git a/toolsrc/include/vcpkg/commands.h b/toolsrc/include/vcpkg/commands.h index 77e478219..dfabb809f 100644 --- a/toolsrc/include/vcpkg/commands.h +++ b/toolsrc/include/vcpkg/commands.h @@ -1,6 +1,5 @@ #pragma once -#include <vcpkg/build.h> #include <vcpkg/commands.interface.h> namespace vcpkg::Commands diff --git a/toolsrc/include/vcpkg/dependencies.h b/toolsrc/include/vcpkg/dependencies.h index 080a28f52..db135aa28 100644 --- a/toolsrc/include/vcpkg/dependencies.h +++ b/toolsrc/include/vcpkg/dependencies.h @@ -1,5 +1,8 @@ #pragma once +#include <vcpkg/fwd/cmakevars.h> +#include <vcpkg/fwd/portfileprovider.h> + #include <vcpkg/base/optional.h> #include <vcpkg/base/util.h> @@ -15,16 +18,6 @@ namespace vcpkg::Graphs struct Randomizer; } -namespace vcpkg::CMakeVars -{ - struct CMakeVarProvider; -} - -namespace vcpkg::PortFileProvider -{ - struct PortFileProvider; -} - namespace vcpkg { struct StatusParagraphs; diff --git a/toolsrc/include/vcpkg/export.chocolatey.h b/toolsrc/include/vcpkg/export.chocolatey.h index 1e6f9a12b..26238cf43 100644 --- a/toolsrc/include/vcpkg/export.chocolatey.h +++ b/toolsrc/include/vcpkg/export.chocolatey.h @@ -1,7 +1,8 @@ #pragma once +#include <vcpkg/fwd/vcpkgpaths.h> + #include <vcpkg/dependencies.h> -#include <vcpkg/vcpkgpaths.h> #include <vector> diff --git a/toolsrc/include/vcpkg/export.prefab.h b/toolsrc/include/vcpkg/export.prefab.h index 8fa064e77..2038949be 100644 --- a/toolsrc/include/vcpkg/export.prefab.h +++ b/toolsrc/include/vcpkg/export.prefab.h @@ -1,9 +1,10 @@ #pragma once +#include <vcpkg/fwd/vcpkgpaths.h> + #include <vcpkg/base/system.h> #include <vcpkg/dependencies.h> -#include <vcpkg/vcpkgpaths.h> #include <vector> diff --git a/toolsrc/include/vcpkg/fwd/build.h b/toolsrc/include/vcpkg/fwd/build.h new file mode 100644 index 000000000..c7f74513f --- /dev/null +++ b/toolsrc/include/vcpkg/fwd/build.h @@ -0,0 +1,7 @@ +#pragma once + +namespace vcpkg::Build +{ + struct BuildInfo; + struct PreBuildInfo; +} diff --git a/toolsrc/include/vcpkg/fwd/cmakevars.h b/toolsrc/include/vcpkg/fwd/cmakevars.h new file mode 100644 index 000000000..e1dade368 --- /dev/null +++ b/toolsrc/include/vcpkg/fwd/cmakevars.h @@ -0,0 +1,6 @@ +#pragma once + +namespace vcpkg::CMakeVars +{ + struct CMakeVarProvider; +} diff --git a/toolsrc/include/vcpkg/fwd/dependencies.h b/toolsrc/include/vcpkg/fwd/dependencies.h new file mode 100644 index 000000000..08e824b4c --- /dev/null +++ b/toolsrc/include/vcpkg/fwd/dependencies.h @@ -0,0 +1,7 @@ +#pragma once + +namespace vcpkg::Dependencies +{ + struct InstallPlanAction; + struct ActionPlan; +} diff --git a/toolsrc/include/vcpkg/fwd/portfileprovider.h b/toolsrc/include/vcpkg/fwd/portfileprovider.h new file mode 100644 index 000000000..08cce1324 --- /dev/null +++ b/toolsrc/include/vcpkg/fwd/portfileprovider.h @@ -0,0 +1,7 @@ +#pragma once + +namespace vcpkg::PortFileProvider +{ + struct PortFileProvider; + struct PathsPortFileProvider; +} diff --git a/toolsrc/include/vcpkg/portfileprovider.h b/toolsrc/include/vcpkg/portfileprovider.h index d3fa0b51f..c127aed40 100644 --- a/toolsrc/include/vcpkg/portfileprovider.h +++ b/toolsrc/include/vcpkg/portfileprovider.h @@ -1,10 +1,11 @@ #pragma once +#include <vcpkg/fwd/vcpkgpaths.h> + #include <vcpkg/base/expected.h> #include <vcpkg/base/util.h> #include <vcpkg/sourceparagraph.h> -#include <vcpkg/vcpkgpaths.h> namespace vcpkg::PortFileProvider { diff --git a/toolsrc/include/vcpkg/postbuildlint.h b/toolsrc/include/vcpkg/postbuildlint.h index 027619eb8..deaf3a2ae 100644 --- a/toolsrc/include/vcpkg/postbuildlint.h +++ b/toolsrc/include/vcpkg/postbuildlint.h @@ -1,8 +1,14 @@ #pragma once -#include <vcpkg/build.h> -#include <vcpkg/packagespec.h> -#include <vcpkg/vcpkgpaths.h> +#include <vcpkg/fwd/build.h> +#include <vcpkg/fwd/vcpkgpaths.h> + +#include <vcpkg/base/files.h> + +namespace vcpkg +{ + struct PackageSpec; +} namespace vcpkg::PostBuildLint { diff --git a/toolsrc/include/vcpkg/registries.h b/toolsrc/include/vcpkg/registries.h index 100bee170..9119ba17b 100644 --- a/toolsrc/include/vcpkg/registries.h +++ b/toolsrc/include/vcpkg/registries.h @@ -2,11 +2,11 @@ #include <vcpkg/base/fwd/json.h> +#include <vcpkg/fwd/vcpkgpaths.h> + #include <vcpkg/base/files.h> #include <vcpkg/base/optional.h> -#include <vcpkg/vcpkgpaths.h> - #include <memory> #include <string> #include <system_error> diff --git a/toolsrc/include/vcpkg/remove.h b/toolsrc/include/vcpkg/remove.h index f68e8bd9f..06bdc23f5 100644 --- a/toolsrc/include/vcpkg/remove.h +++ b/toolsrc/include/vcpkg/remove.h @@ -1,7 +1,10 @@ #pragma once +#include <vcpkg/fwd/dependencies.h> +#include <vcpkg/fwd/vcpkgcmdarguments.h> +#include <vcpkg/fwd/vcpkgpaths.h> + #include <vcpkg/commands.interface.h> -#include <vcpkg/dependencies.h> namespace vcpkg::Remove { diff --git a/toolsrc/include/vcpkg/triplet.h b/toolsrc/include/vcpkg/triplet.h index 42d99dc3e..40f6d6f23 100644 --- a/toolsrc/include/vcpkg/triplet.h +++ b/toolsrc/include/vcpkg/triplet.h @@ -1,5 +1,7 @@ #pragma once +#include <vcpkg/fwd/vcpkgcmdarguments.h> + #include <vcpkg/base/optional.h> #include <vcpkg/base/system.h> @@ -8,7 +10,6 @@ namespace vcpkg { struct TripletInstance; - struct VcpkgCmdArguments; struct Triplet { diff --git a/toolsrc/include/vcpkg/update.h b/toolsrc/include/vcpkg/update.h index 2c05e489e..063e16997 100644 --- a/toolsrc/include/vcpkg/update.h +++ b/toolsrc/include/vcpkg/update.h @@ -1,11 +1,18 @@ #pragma once +#include <vcpkg/fwd/portfileprovider.h> +#include <vcpkg/fwd/vcpkgcmdarguments.h> +#include <vcpkg/fwd/vcpkgpaths.h> + #include <vcpkg/commands.interface.h> -#include <vcpkg/dependencies.h> #include <vcpkg/packagespec.h> -#include <vcpkg/statusparagraphs.h> #include <vcpkg/versiont.h> +namespace vcpkg +{ + struct StatusParagraphs; +} + namespace vcpkg::Update { struct OutdatedPackage |
