style: unify identifier naming per updated conventions
Automated with clang-tidy readability-identifier-naming (config added to .clang-tidy) plus scripted passes, per the updated rules now documented in CONTRIBUTING.md: - types (class/struct/enum/alias/template params): PascalCase - functions, variables, members: snake_case (incl. rational -> Rational) - private/protected members: trailing underscore; static member variables likewise (instance_, available_themes_) - constants and enum values: snake_case (kLinear -> k_linear, F32P -> f32p); ALL_CAPS reserved for macros - macros: OAK_ prefix (OLIVE_ADD_TEST/OLIVE_ASSERT/OLIVE_CONFIG -> OAK_ADD_TEST/OAK_ASSERT/OAK_CONFIG, GL_PREAMBLE -> OAK_GL_PREAMBLE, include guards -> OAK_*) - file names: all lowercase (Current/Plugin/OliveHost/OliveClip/ OlivePluginInstance -> current/plugin/olivehost/oliveclip/ oliveplugininstance) - getters share the member name sans underscore, setters set_foo() - Qt and third-party (OpenFX) virtual overrides and framework callbacks keep their original names (exempt in .clang-tidy) Manual follow-ups required where automation could not reach: - string-based QMetaObject/SIGNAL/SLOT references updated to renamed methods (AddTask, CreatedFile, DeleteSpecificFile, moveSelectionUp, ...) - macro bodies referencing renamed methods (OLIVE_CONFIG, NODE_DEFAULT_DESTRUCTOR, MANAGEDDISPLAYWIDGET_*) - self-shadowing locals renamed where signals/methods became same-named (size_changed, worker_count, selected_items, import param, filters) - third_party OFX member/namespace usages restored (OFX::Host::*, _created, _clipPrefsDirty, createInstance, clearPersistentMessage) - STL protocol aliases restored (const_iterator) with .clang-tidy ignore rules; qHash overloads restored Full build and test suite pass: ctest 4/4, ~1960 gtest cases green.
This commit is contained in:
+15
-15
@@ -19,8 +19,8 @@
|
||||
|
||||
***/
|
||||
|
||||
#ifndef RENDERTEXTURE_H
|
||||
#define RENDERTEXTURE_H
|
||||
#ifndef OAK_RENDERTEXTURE_H
|
||||
#define OAK_RENDERTEXTURE_H
|
||||
|
||||
#include "common/avframeptr.h"
|
||||
|
||||
@@ -44,9 +44,9 @@ using TexturePtr = std::shared_ptr<Texture>;
|
||||
|
||||
class Texture {
|
||||
public:
|
||||
enum Interpolation { kNearest, kLinear, kMipmappedLinear };
|
||||
enum Interpolation { k_nearest, k_linear, k_mipmapped_linear };
|
||||
|
||||
static const Interpolation kDefaultInterpolation;
|
||||
static const Interpolation k_default_interpolation;
|
||||
|
||||
/**
|
||||
* @brief Construct a dummy texture with no renderer backend
|
||||
@@ -93,21 +93,21 @@ public:
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
static TexturePtr Job(const VideoParams &p, const T &j)
|
||||
static TexturePtr job(const VideoParams &p, const T &j)
|
||||
{
|
||||
return std::make_shared<Texture>(p, j);
|
||||
}
|
||||
|
||||
template <typename T> TexturePtr toJob(const T &job)
|
||||
template <typename T> TexturePtr to_job(const T &job)
|
||||
{
|
||||
return Texture::Job(params_, job);
|
||||
return Texture::job(params_, job);
|
||||
}
|
||||
|
||||
void Upload(void *data, int linesize);
|
||||
void upload(void *data, int linesize);
|
||||
|
||||
void Download(void *data, int linesize);
|
||||
void download(void *data, int linesize);
|
||||
|
||||
bool IsDummy() const
|
||||
bool is_dummy() const
|
||||
{
|
||||
return !renderer_;
|
||||
}
|
||||
@@ -142,7 +142,7 @@ public:
|
||||
return params_.divider();
|
||||
}
|
||||
|
||||
const rational &pixel_aspect_ratio() const
|
||||
const Rational &pixel_aspect_ratio() const
|
||||
{
|
||||
return params_.pixel_aspect_ratio();
|
||||
}
|
||||
@@ -152,7 +152,7 @@ public:
|
||||
return renderer_;
|
||||
}
|
||||
|
||||
bool IsJob() const
|
||||
bool is_job() const
|
||||
{
|
||||
return job_;
|
||||
}
|
||||
@@ -160,7 +160,7 @@ public:
|
||||
{
|
||||
return job_;
|
||||
}
|
||||
void handleFrame(AVFramePtr ptr)
|
||||
void handle_frame(AVFramePtr ptr)
|
||||
{
|
||||
frame_ = ptr;
|
||||
}
|
||||
@@ -170,7 +170,7 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
bool IsRendererAlive() const
|
||||
bool is_renderer_alive() const
|
||||
{
|
||||
return renderer_ &&
|
||||
(!renderer_lifetime_ || renderer_lifetime_->alive.load());
|
||||
@@ -192,4 +192,4 @@ private:
|
||||
|
||||
Q_DECLARE_METATYPE(olive::TexturePtr)
|
||||
|
||||
#endif // RENDERTEXTURE_H
|
||||
#endif // OAK_RENDERTEXTURE_H
|
||||
|
||||
Reference in New Issue
Block a user