Codechange: Pass ContentInfo by reference.

Many functions take a ContentInfo pointer, but do not check for nullptr.
Pass by reference instead to assure it is present.
This commit is contained in:
Peter Nelson
2025-04-10 07:37:28 +01:00
committed by Peter Nelson
parent 1cfad1474a
commit 7b31f26611
17 changed files with 94 additions and 94 deletions

View File

@@ -66,7 +66,7 @@ public:
* @param md5sum Whether to check the MD5 checksum.
* @return True iff we have a script matching.
*/
bool HasScript(const struct ContentInfo *ci, bool md5sum);
bool HasScript(const struct ContentInfo &ci, bool md5sum);
/**
* Find a script of a #ContentInfo
@@ -74,7 +74,7 @@ public:
* @param md5sum Whether to check the MD5 checksum.
* @return A filename of a file of the content, else \c nullptr.
*/
const char *FindMainScript(const ContentInfo *ci, bool md5sum);
const char *FindMainScript(const ContentInfo &ci, bool md5sum);
bool AddFile(const std::string &filename, size_t basepath_length, const std::string &tar_filename) override;