[fpc-devel] Crosscompiling win towards darwin

Sven Barth pascaldragon at googlemail.com
Mon Nov 21 14:42:39 CET 2016


Am 21.11.2016 11:40 schrieb "Alfred" <alfred at consulab.nl>:
> c++ code.

Comments added inline.

>
> findFile(path):
> Options::FileInfo Options::findFile(const std::string &path) const
> calls:

You should check before this call whether the file exists.
"tbdInfo.checkFileExists(*this, path.c_str());" should do it and then you
need to fill the result and return it.

> if ( findFile(path, {".tbd"}, result) )
> return result;
>
> findFile(path,{...},result):
> bool Options::findFile(const std::string &path, const
std::vector<std::string> &tbdExtensions, FileInfo& result) const
> calls
> for ( const auto &ext : tbdExtensions ) {
> auto newPath = replace_extension(path, ext);
> bool found = tbdInfo.checkFileExists(*this, newPath.c_str());
> }
>

Regards,
Sven
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20161121/716b2d05/attachment.html>


More information about the fpc-devel mailing list