Skip to content

Commit

Permalink
Add and apply editorconfig
Browse files Browse the repository at this point in the history
  • Loading branch information
Chronial committed Feb 6, 2019
1 parent 1c06a65 commit 24600ed
Show file tree
Hide file tree
Showing 47 changed files with 61 additions and 53 deletions.
7 changes: 7 additions & 0 deletions .editorconfig
@@ -0,0 +1,7 @@
root=true

[*]
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
3 changes: 2 additions & 1 deletion .gitattributes
@@ -1 +1,2 @@
* text=auto
* text=auto eol=lf
*.vcxproj* text=auto eol=crlf
16 changes: 8 additions & 8 deletions BUILD_IN_COVERCONFIGS.h

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion BlockingQueue.h
Expand Up @@ -43,4 +43,4 @@ class BlockingQueue
std::unique_lock<std::mutex> lock(this->d_mutex);
return this->d_queue.size();
}
};
};
2 changes: 1 addition & 1 deletion CPScriptCompiler.cpp
Expand Up @@ -371,4 +371,4 @@ bool CPScriptCompiler::scShowMirrorPlane(bool& res, pfc::string_base& message){
message = pfc::stringcvt::string_utf8_from_wide(scriptObj.GetErrorString());
}
return false;
}
}
2 changes: 1 addition & 1 deletion ConfigWindow.cpp
Expand Up @@ -1066,4 +1066,4 @@ class ConfigWindow :
void reset(){}
};

static service_factory_single_t<ConfigWindow> x_configWindow;
static service_factory_single_t<ConfigWindow> x_configWindow;
2 changes: 1 addition & 1 deletion ContainerWindow.h
Expand Up @@ -32,4 +32,4 @@ class ContainerWindow {

static LRESULT CALLBACK WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
LRESULT MessageHandler(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
};
};
2 changes: 1 addition & 1 deletion CoverConfig.cpp
Expand Up @@ -101,4 +101,4 @@ void cfg_coverConfigs::set_data_raw(stream_reader * p_stream, t_size p_sizehint,

add_items(buildIn);
sort_remove_duplicates_t(&CoverConfig_compareName::static_compare); // just to be sure...
}
}
2 changes: 1 addition & 1 deletion CoverConfig.h
Expand Up @@ -19,4 +19,4 @@ class cfg_coverConfigs :
void set_data_raw(stream_reader * p_stream, t_size p_sizehint, abort_callback & p_abort);
private:
static const unsigned int version = 1;
};
};
2 changes: 1 addition & 1 deletion CoverPositionsCompile.py
Expand Up @@ -9,7 +9,7 @@
def update_file_contents(fn, contents):
"""Set file contents, only writing if needed to reduce recompilation"""
global made_changes
with open(fn, "r+") as f:
with open(fn, "r+", newline="\n") as f:
old_contents = f.read()
if old_contents != contents:
made_changes = True
Expand Down
2 changes: 1 addition & 1 deletion CuiComponent.cpp
Expand Up @@ -61,4 +61,4 @@ class cui_chronflow : public ui_extension::window {
}
};

static service_factory_single_t<cui_chronflow> cui_chronflow_instance;
static service_factory_single_t<cui_chronflow> cui_chronflow_instance;
2 changes: 1 addition & 1 deletion DbAlbumCollection.cpp
Expand Up @@ -140,4 +140,4 @@ void DbAlbumCollection::moveTargetBy(int n)
{
movePosBy(targetPos, n);
sessionSelectedCover = this->rank(targetPos);
}
}
2 changes: 1 addition & 1 deletion DbAlbumCollection.h
Expand Up @@ -101,4 +101,4 @@ class DbAlbumCollection {
DbAlbums albums;
CollectionPos targetPos;
service_ptr_t<titleformat_object> albumMapper;
};
};
2 changes: 1 addition & 1 deletion DbReloadWorker.h
Expand Up @@ -24,4 +24,4 @@ class DbReloadWorker {
private:
void threadProc();
void generateData();
};
};
2 changes: 1 addition & 1 deletion DisplayPosition.cpp
Expand Up @@ -109,4 +109,4 @@ float DisplayPosition::getCenteredOffset(void) const
void DisplayPosition::hardSetCenteredPos(CollectionPos pos)
{
centeredPos = pos;
}
}
2 changes: 1 addition & 1 deletion EngineThread.h
Expand Up @@ -62,4 +62,4 @@ class EngineThread : public play_callback_impl_base {

static std::unordered_set<EngineThread*> instances;
friend class Engine;
};
};
2 changes: 1 addition & 1 deletion EngineWindow.h
Expand Up @@ -38,4 +38,4 @@ class EngineWindow {
void onWindowSize(int width, int height);
void onScroll(double xoffset, double yoffset);
void onContextMenu(const int x, const int y);
};
};
2 changes: 1 addition & 1 deletion FindAsYouType.cpp
Expand Up @@ -72,4 +72,4 @@ bool FindAsYouType::updateSearch(const char * searchFor) {
});

return result;
}
}
2 changes: 1 addition & 1 deletion FindAsYouType.h
Expand Up @@ -23,4 +23,4 @@ class FindAsYouType {
void removeChar();
void reset();
bool updateSearch(const char* searchFor);
};
};
2 changes: 1 addition & 1 deletion Helpers.h
Expand Up @@ -125,4 +125,4 @@ class Timer {

PTP_TIMER timer;
std::function<void()> f;
};
};
2 changes: 1 addition & 1 deletion Image.h
Expand Up @@ -55,4 +55,4 @@ class UploadReadyImage {
};

std::optional<UploadReadyImage> loadAlbumArt(const metadb_handle_list& tracks);
UploadReadyImage loadSpecialArt(WORD resource, pfc::string8 userImage);
UploadReadyImage loadSpecialArt(WORD resource, pfc::string8 userImage);
2 changes: 1 addition & 1 deletion MyActions.cpp
Expand Up @@ -91,4 +91,4 @@ void executeAction(const char * action, const AlbumInfo& album) {
if (menu_helpers::find_command_by_name(action, commandGuid)) {
menu_helpers::run_command_context(commandGuid, pfc::guid_null, album.tracks);
}
}
}
2 changes: 1 addition & 1 deletion PlaybackTracer.cpp
Expand Up @@ -37,4 +37,4 @@ void PlaybackTracer::onPlaybackNewTrack(metadb_handle_ptr p_track)
if (!cfgCoverFollowsPlayback || delayTimer.has_value())
return;
moveToNowPlaying();
}
}
2 changes: 1 addition & 1 deletion PlaybackTracer.h
Expand Up @@ -15,4 +15,4 @@ class PlaybackTracer

private:
std::optional<Timer> delayTimer;
};
};
2 changes: 1 addition & 1 deletion Readme.md
Expand Up @@ -5,4 +5,4 @@ A coverflow plugin for foobar.
![Screenshot of foo_chronflow](http://chronial.de/foobar2000/foo_chronflow.png)

This plugin provides a Default UI panel that displays a 3d rendering of the
albums in your media library.
albums in your media library.
2 changes: 1 addition & 1 deletion Renderer.cpp
Expand Up @@ -377,4 +377,4 @@ void Renderer::drawCovers(bool showTarget){
}
}
}
}
}
2 changes: 1 addition & 1 deletion SafeArrayHelper.h
Expand Up @@ -26,4 +26,4 @@ class CSafeArrayHelper
LPSAFEARRAY m_pSA;

private:
};
};
2 changes: 1 addition & 1 deletion TODO.txt
Expand Up @@ -72,4 +72,4 @@ Transparente png covers (von hinten nach vorne rendern! -> alpha test aus)
-- Transparenz-support entfernen?


Windows Script Control: http://www.microsoft.com/downloads/details.aspx?FamilyId=D7E31492-2595-49E6-8C02-1426FEC693AC&displaylang=en
Windows Script Control: http://www.microsoft.com/downloads/details.aspx?FamilyId=D7E31492-2595-49E6-8C02-1426FEC693AC&displaylang=en
2 changes: 1 addition & 1 deletion TextDisplay.cpp
Expand Up @@ -212,4 +212,4 @@ TextDisplay::DisplayTexture TextDisplay::createTexture(const char* text)

}
return displayTex;
}
}
2 changes: 1 addition & 1 deletion _defaultConfigs/Albumart.js
Expand Up @@ -20,4 +20,4 @@ function eyePos(){ return new Array(0, 0, 0.5/Math.tan(Math.PI/8)) }
function lookAt(){ return new Array(0, 0, 0) }
function upVector(){ return new Array(0, 1, 0) }

function showMirrorPlane(){ return false }
function showMirrorPlane(){ return false }
2 changes: 1 addition & 1 deletion _defaultConfigs/Default (v0.2).js
Expand Up @@ -48,4 +48,4 @@ function upVector(){ return new Array(0, 1, 0) }

function showMirrorPlane(){ return true }
function mirrorPoint(){ return new Array(0, 0, 0) }
function mirrorNormal(){ return new Array(0, 1, 0) }
function mirrorNormal(){ return new Array(0, 1, 0) }
2 changes: 1 addition & 1 deletion _defaultConfigs/Default (v0.3).js
Expand Up @@ -112,4 +112,4 @@ function mirrorPoint (){
// Normal of the Mirror Plane
function mirrorNormal (){
return new Array(0, 1, 0);
}
}
2 changes: 1 addition & 1 deletion _defaultConfigs/Default.js
Expand Up @@ -117,4 +117,4 @@ function mirrorPoint (){
// Normal of the Mirror Plane
function mirrorNormal (){
return new Array(0, 1, 0);
}
}
2 changes: 1 addition & 1 deletion _defaultConfigs/Shelf.js
Expand Up @@ -70,4 +70,4 @@ function upVector(){ return new Array(0, 1, 0) }

function showMirrorPlane(){ return true }
function mirrorPoint (){ return new Array(0, 0, 0) }
function mirrorNormal (){ return new Array(0, 1, 0) }
function mirrorNormal (){ return new Array(0, 1, 0) }
2 changes: 1 addition & 1 deletion _defaultConfigs/Simple.js
Expand Up @@ -39,4 +39,4 @@ function eyePos(){ return new Array(0, 0, 0) }
function lookAt(){ return new Array(0, 0, -1.5) }
function upVector(){ return new Array(0, 1, 0) }

function showMirrorPlane(){ return false }
function showMirrorPlane(){ return false }
2 changes: 1 addition & 1 deletion _defaultConfigs/Spiral.js
Expand Up @@ -40,4 +40,4 @@ function upVector(){ return new Array(0, 1, 0) }

function showMirrorPlane(){ return true }
function mirrorPoint(){ return new Array(outerRadius, 0, 0) }
function mirrorNormal(){ return new Array(1, 0, 0) }
function mirrorNormal(){ return new Array(1, 0, 0) }
2 changes: 1 addition & 1 deletion _defaultConfigs/Vinyl Collection.js
Expand Up @@ -36,4 +36,4 @@ function eyePos(){
function lookAt(){ return new Array(0, 0.5, 0) }
function upVector(){ return new Array(0, 1, 0) }

function showMirrorPlane(){ return false; }
function showMirrorPlane(){ return false; }
2 changes: 1 addition & 1 deletion _defaultConfigs/_newDefault.js
Expand Up @@ -94,4 +94,4 @@ function mirrorPoint(){
// Normal of the Mirror Plane
function mirrorNormal(){
return new Array(0, 1, 0);
}
}
2 changes: 1 addition & 1 deletion base.h
Expand Up @@ -26,4 +26,4 @@ template <auto fn>
using deleter_from_fn = std::integral_constant<decltype(fn), fn>;

template <typename T, auto fn>
using unique_ptr_del = std::unique_ptr<T, deleter_from_fn<fn>>;
using unique_ptr_del = std::unique_ptr<T, deleter_from_fn<fn>>;
2 changes: 1 addition & 1 deletion config.cpp
Expand Up @@ -177,4 +177,4 @@ cfg_compiledCPInfoPtr sessionCompiledCPInfo(guid_sessionCompiledCPInfo);

// {85744FC7-38A3-47e7-8080-3744431211E6}
static const GUID guid_sessionSelectedConfigTab = { 0x85744fc7, 0x38a3, 0x47e7, { 0x80, 0x80, 0x37, 0x44, 0x43, 0x12, 0x11, 0xe6 } };
cfg_int sessionSelectedConfigTab(guid_sessionSelectedConfigTab, 0);
cfg_int sessionSelectedConfigTab(guid_sessionSelectedConfigTab, 0);
2 changes: 1 addition & 1 deletion config.h
Expand Up @@ -50,4 +50,4 @@ extern cfg_bool cfgShowFps;

// Non-config vars
extern cfg_int sessionSelectedCover;
extern cfg_int sessionSelectedConfigTab;
extern cfg_int sessionSelectedConfigTab;
2 changes: 1 addition & 1 deletion engine_messages.cpp
Expand Up @@ -127,4 +127,4 @@ void EM::CollectionReloadedMessage::run(Engine& e) {

void EM::PlaybackNewTrack::run(Engine& e, metadb_handle_ptr track) {
e.playbackTracer.onPlaybackNewTrack(track);
}
}
2 changes: 1 addition & 1 deletion engine_messages.h
Expand Up @@ -75,4 +75,4 @@ struct Engine::Messages {
};

#undef E_MSG
#undef E_ANSWER_MSG
#undef E_ANSWER_MSG
2 changes: 1 addition & 1 deletion glStructs.h
Expand Up @@ -165,4 +165,4 @@ struct glQuad { //GL_V3F
bottomLeft = trans * bottomLeft;
bottomRight = trans * bottomRight;
}
};
};
2 changes: 1 addition & 1 deletion main.cpp
Expand Up @@ -51,4 +51,4 @@ class QuitHandler : public initquit {
glfwTerminate();
}
};
static service_factory_single_t<QuitHandler> quitHandler;
static service_factory_single_t<QuitHandler> quitHandler;
2 changes: 1 addition & 1 deletion stdafx.cpp
@@ -1 +1 @@
#include "stdafx.h"
#include "stdafx.h"
2 changes: 1 addition & 1 deletion win32_helpers.h
Expand Up @@ -111,4 +111,4 @@ struct logfont_utf8_from_os : public uLOGFONT
}
};

#endif
#endif

0 comments on commit 24600ed

Please sign in to comment.