mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Formatting: Remove double-dots from comments and other strings
This commit is contained in:
parent
82dc6d1c7e
commit
83e5264c86
209 changed files with 508 additions and 509 deletions
|
|
@ -114,7 +114,7 @@ bool DirectoryIterator::next (bool* isDirResult, bool* isHiddenResult, int64* fi
|
|||
matches = (whatToLookFor & File::findFiles) != 0;
|
||||
}
|
||||
|
||||
// if we're not relying on the OS iterator to do the wildcard match, do it now..
|
||||
// if we're not relying on the OS iterator to do the wildcard match, do it now
|
||||
if (matches && (isRecursive || wildCards.size() > 1))
|
||||
matches = fileMatches (wildCards, filename);
|
||||
|
||||
|
|
|
|||
|
|
@ -145,7 +145,7 @@ String File::parseAbsolutePath (const String& p)
|
|||
return {};
|
||||
|
||||
#if JUCE_WINDOWS
|
||||
// Windows..
|
||||
// Windows
|
||||
auto path = normaliseSeparators (removeEllipsis (p.replaceCharacter ('/', '\\')));
|
||||
|
||||
if (path.startsWithChar (getSeparatorChar()))
|
||||
|
|
@ -178,7 +178,7 @@ String File::parseAbsolutePath (const String& p)
|
|||
return File::getCurrentWorkingDirectory().getChildFile (path).getFullPathName();
|
||||
}
|
||||
#else
|
||||
// Mac or Linux..
|
||||
// Mac or Linux
|
||||
|
||||
// Yes, I know it's legal for a unix pathname to contain a backslash, but this assertion is here
|
||||
// to catch anyone who's trying to run code that was written on Windows with hard-coded path names.
|
||||
|
|
@ -228,7 +228,7 @@ String File::parseAbsolutePath (const String& p)
|
|||
}
|
||||
#endif
|
||||
|
||||
while (path.endsWithChar (getSeparatorChar()) && path != getSeparatorString()) // careful not to turn a single "/" into an empty string.
|
||||
while (path.endsWithChar (getSeparatorChar()) && path != getSeparatorString()) // careful not to turn a single "/" into an empty string
|
||||
path = path.dropLastCharacters (1);
|
||||
|
||||
return path;
|
||||
|
|
@ -629,7 +629,7 @@ File File::getNonexistentChildFile (const String& suggestedPrefix,
|
|||
int number = 1;
|
||||
auto prefix = suggestedPrefix;
|
||||
|
||||
// remove any bracketed numbers that may already be on the end..
|
||||
// remove any bracketed numbers that may already be on the end
|
||||
if (prefix.trim().endsWithChar (')'))
|
||||
{
|
||||
putNumbersInBrackets = true;
|
||||
|
|
@ -941,7 +941,7 @@ String File::getRelativePathFrom (const File& dir) const
|
|||
}
|
||||
}
|
||||
|
||||
// if the only common bit is the root, then just return the full path..
|
||||
// if the only common bit is the root, then just return the full path
|
||||
if (commonBitLength == 0 || (commonBitLength == 1 && thisPath[1] == getSeparatorChar()))
|
||||
return fullPath;
|
||||
|
||||
|
|
@ -1118,7 +1118,7 @@ public:
|
|||
if (roots[i].exists())
|
||||
++numRootsExisting;
|
||||
|
||||
// (on windows, some of the drives may not contain media, so as long as at least one is ok..)
|
||||
// on windows, some of the drives may not contain media, so as long as at least one is ok
|
||||
expect (numRootsExisting > 0);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -756,7 +756,7 @@ public:
|
|||
the file first and then re-writing it, it creates a new temporary file,
|
||||
writes the data to that, and then moves the new file to replace the existing
|
||||
file. This means that if the power gets pulled out or something crashes,
|
||||
you're a lot less likely to end up with a corrupted or unfinished file..
|
||||
you're a lot less likely to end up with a corrupted or unfinished file.
|
||||
|
||||
Returns true if the operation succeeds, or false if it fails.
|
||||
|
||||
|
|
@ -791,7 +791,7 @@ public:
|
|||
the file first and then re-writing it, it creates a new temporary file,
|
||||
writes the text to that, and then moves the new file to replace the existing
|
||||
file. This means that if the power gets pulled out or something crashes,
|
||||
you're a lot less likely to end up with an empty file..
|
||||
you're a lot less likely to end up with an empty file.
|
||||
|
||||
For an explanation of the parameters here, see the appendText() method.
|
||||
|
||||
|
|
|
|||
|
|
@ -99,7 +99,7 @@ bool TemporaryFile::overwriteTargetFileWithTemporary() const
|
|||
|
||||
if (temporaryFile.exists())
|
||||
{
|
||||
// Have a few attempts at overwriting the file before giving up..
|
||||
// Have a few attempts at overwriting the file before giving up.
|
||||
for (int i = 5; --i >= 0;)
|
||||
{
|
||||
if (temporaryFile.replaceFileIn (targetFile))
|
||||
|
|
@ -120,7 +120,7 @@ bool TemporaryFile::overwriteTargetFileWithTemporary() const
|
|||
|
||||
bool TemporaryFile::deleteTemporaryFile() const
|
||||
{
|
||||
// Have a few attempts at deleting the file before giving up..
|
||||
// Have a few attempts at deleting the file before giving up.
|
||||
for (int i = 5; --i >= 0;)
|
||||
{
|
||||
if (temporaryFile.isDirectory() ? temporaryFile.deleteRecursively() : temporaryFile.deleteFile())
|
||||
|
|
|
|||
|
|
@ -58,12 +58,12 @@ namespace juce
|
|||
out->write ( ...etc )
|
||||
out.reset(); // (deletes the stream)
|
||||
|
||||
// ..now we've finished writing, this will rename the temp file to
|
||||
// make it replace the target file we specified above.
|
||||
// ...now we've finished writing, this will rename the temp file to
|
||||
// make it replace the target file we specified above
|
||||
bool succeeded = temp.overwriteTargetFileWithTemporary();
|
||||
}
|
||||
|
||||
// ..and even if something went wrong and our overwrite failed,
|
||||
// ...and even if something went wrong and our overwrite failed,
|
||||
// as the TemporaryFile object goes out of scope here, it'll make sure
|
||||
// that the temp file gets deleted.
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue