Browse Source

Introjucer: removed a couple of bits of C++11 code

tags/2021-05-28
jules 10 years ago
parent
commit
a2a2db98a3
2 changed files with 13 additions and 13 deletions
  1. +6
    -6
      extras/Introjucer/Source/Project Saving/jucer_ProjectExport_Android.h
  2. +7
    -7
      extras/Introjucer/Source/Project Saving/jucer_ProjectExport_AndroidStudio.h

+ 6
- 6
extras/Introjucer/Source/Project Saving/jucer_ProjectExport_Android.h View File

@@ -591,17 +591,17 @@ private:
overwriteFileIfDifferentOrThrow (file, mo); overwriteFileIfDifferentOrThrow (file, mo);
} }
struct ShouldFileBeCompiledPredicate
{
bool operator() (const Project::Item& projectItem) const { return projectItem.shouldBeCompiled(); }
};
void writeAndroidMk (const File& file) const void writeAndroidMk (const File& file) const
{ {
Array<RelativePath> files; Array<RelativePath> files;
struct Predicate
{
bool operator() (const Project::Item& projectItem) const { return projectItem.shouldBeCompiled(); }
};
for (int i = 0; i < getAllGroups().size(); ++i) for (int i = 0; i < getAllGroups().size(); ++i)
findAllProjectItemsWithPredicate (getAllGroups().getReference(i), files, Predicate());
findAllProjectItemsWithPredicate (getAllGroups().getReference(i), files, ShouldFileBeCompiledPredicate());
MemoryOutputStream mo; MemoryOutputStream mo;
writeAndroidMk (mo, files); writeAndroidMk (mo, files);


+ 7
- 7
extras/Introjucer/Source/Project Saving/jucer_ProjectExport_AndroidStudio.h View File

@@ -247,7 +247,7 @@ private:
{ {
if (path.startsWith ("~")) if (path.startsWith ("~"))
{ {
const String homeFolder (File::getSpecialLocation (File::SpecialLocationType::userHomeDirectory).getFullPathName());
const String homeFolder (File::getSpecialLocation (File::userHomeDirectory).getFullPathName());
path = path.replaceSection (0, 1, homeFolder); path = path.replaceSection (0, 1, homeFolder);
} }
@@ -366,6 +366,11 @@ private:
return result; return result;
} }
struct ShouldBeAddedToProjectPredicate
{
bool operator() (const Project::Item& projectItem) const { return projectItem.shouldBeAddedToTargetProject(); }
};
StringArray getCPPFlags() const StringArray getCPPFlags() const
{ {
StringArray result; StringArray result;
@@ -401,13 +406,8 @@ private:
Array<RelativePath> cppFiles; Array<RelativePath> cppFiles;
const Array<Project::Item>& groups = getAllGroups(); const Array<Project::Item>& groups = getAllGroups();
struct Predicate
{
bool operator() (const Project::Item& projectItem) const { return projectItem.shouldBeAddedToTargetProject(); }
};
for (int i = 0; i < groups.size(); ++i) for (int i = 0; i < groups.size(); ++i)
findAllProjectItemsWithPredicate (groups.getReference (i), cppFiles, Predicate());
findAllProjectItemsWithPredicate (groups.getReference (i), cppFiles, ShouldBeAddedToProjectPredicate());
for (int i = 0; i < cppFiles.size(); ++i) for (int i = 0; i < cppFiles.size(); ++i)
{ {


Loading…
Cancel
Save