Fixing whitespace issues (converting spaces back to tabs... for now)

This commit is contained in:
Jonathan Thomas
2022-07-21 15:00:08 -05:00
parent f200c00e4c
commit 9202d94ee6
7 changed files with 484 additions and 484 deletions

View File

@@ -36,9 +36,9 @@ CacheMemory::CacheMemory(int64_t max_bytes) : CacheBase(max_bytes) {
// Default destructor
CacheMemory::~CacheMemory()
{
Clear();
Clear();
// remove mutex
// remove mutex
delete cacheMutex;
}
@@ -129,11 +129,11 @@ void CacheMemory::Add(std::shared_ptr<Frame> frame)
// Check if frame is already contained in cache
bool CacheMemory::Contains(int64_t frame_number) {
if (frames.count(frame_number) > 0) {
return true;
} else {
return false;
}
if (frames.count(frame_number) > 0) {
return true;
} else {
return false;
}
}
// Get a frame from the cache (or NULL shared_ptr if no frame is found)
@@ -155,18 +155,18 @@ std::shared_ptr<Frame> CacheMemory::GetFrame(int64_t frame_number)
// @brief Get an array of all Frames
std::vector<std::shared_ptr<openshot::Frame>> CacheMemory::GetFrames()
{
// Create a scoped lock, to protect the cache from multiple threads
const std::lock_guard<std::recursive_mutex> lock(*cacheMutex);
// Create a scoped lock, to protect the cache from multiple threads
const std::lock_guard<std::recursive_mutex> lock(*cacheMutex);
std::vector<std::shared_ptr<openshot::Frame>> all_frames;
std::vector<int64_t>::iterator itr_ordered;
for(itr_ordered = ordered_frame_numbers.begin(); itr_ordered != ordered_frame_numbers.end(); ++itr_ordered)
{
int64_t frame_number = *itr_ordered;
all_frames.push_back(GetFrame(frame_number));
}
std::vector<std::shared_ptr<openshot::Frame>> all_frames;
std::vector<int64_t>::iterator itr_ordered;
for(itr_ordered = ordered_frame_numbers.begin(); itr_ordered != ordered_frame_numbers.end(); ++itr_ordered)
{
int64_t frame_number = *itr_ordered;
all_frames.push_back(GetFrame(frame_number));
}
return all_frames;
return all_frames;
}
// Get the smallest frame number (or NULL shared_ptr if no frame is found)
@@ -186,9 +186,9 @@ std::shared_ptr<Frame> CacheMemory::GetSmallestFrame()
// Return frame (if any)
if (smallest_frame != -1) {
return frames[smallest_frame];
} else {
return NULL;
return frames[smallest_frame];
} else {
return NULL;
}
}