Skip to content

Commit

Permalink
Enable end-of-file fixer
Browse files Browse the repository at this point in the history
  • Loading branch information
tobiashienzsch committed Oct 14, 2023
1 parent 0e5891e commit 2c82148
Show file tree
Hide file tree
Showing 162 changed files with 159 additions and 163 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ repos:
- id: check-xml
- id: check-json
- id: trailing-whitespace
# - id: end-of-file-fixer
- id: end-of-file-fixer
- id: detect-private-key
- id: requirements-txt-fixer
- id: check-case-conflict
Expand Down
2 changes: 0 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,3 @@ else()

add_subdirectory("src")
endif()


2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
DAMAGE.
DAMAGE.
2 changes: 1 addition & 1 deletion assets/fonts/open-sans/Apache License.txt
Original file line number Diff line number Diff line change
Expand Up @@ -198,4 +198,4 @@ Apache License
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
limitations under the License.
2 changes: 1 addition & 1 deletion assets/shader/freetype_es2.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ void main()
{
vec4 sampled = vec4(1.0, 1.0, 1.0, texture2D(text, TexCoords).r);
gl_FragColor = vec4(textColor, 1.0) * sampled;
}
}
2 changes: 1 addition & 1 deletion cmake/MociCompilerOptions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ if(LIST_OF_SANITIZERS)
target_compile_options(compiler_options INTERFACE -fsanitize=${LIST_OF_SANITIZERS} -O1 -g -fno-omit-frame-pointer)
target_link_libraries(compiler_options INTERFACE -fsanitize=${LIST_OF_SANITIZERS} -O1 -g -fno-omit-frame-pointer)
endif()
endif()
endif()
2 changes: 1 addition & 1 deletion cmake/MociCompilerWarnings.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ if(MSVC)
target_compile_options(compiler_warnings INTERFACE /W4 "/permissive-" /wd4201)
else()
target_compile_options(compiler_warnings INTERFACE -Wall -Wextra -Wpedantic -Wno-shadow)
endif()
endif()
2 changes: 1 addition & 1 deletion cmake/MociConan.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ else()
SETTINGS
${settings}
)
endif()
endif()
2 changes: 1 addition & 1 deletion docs/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1 @@
documentation
documentation
2 changes: 1 addition & 1 deletion docs/Doxyfile.in
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,4 @@ ENUM_VALUES_PER_LINE = 1
#HTML_EXTRA_STYLESHEET = doxygen-awesome-css/doxygen-awesome.css

#GENERATE_TREEVIEW = YES # required!
#HTML_EXTRA_STYLESHEET = doxygen-awesome-css/doxygen-awesome.css doxygen-awesome-css/doxygen-awesome-sidebar-only.css
#HTML_EXTRA_STYLESHEET = doxygen-awesome-css/doxygen-awesome.css doxygen-awesome-css/doxygen-awesome-sidebar-only.css
1 change: 0 additions & 1 deletion scripts/gen-msdf-texture.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,3 @@ done

montage tmp/*.png -geometry +0+0 -tile 16x DejaVuSansMono.png
convert DejaVuSansMono.png -define h:format=rgba -depth 8 DejaVuSansMono.h

2 changes: 1 addition & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ add_subdirectory("moci/application")
add_subdirectory("moci/graphics_extra")
add_subdirectory("moci/widgets")

add_subdirectory("app")
add_subdirectory("app")
2 changes: 1 addition & 1 deletion src/app/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ if(MOCI_BUILD_PLAYGROUND)
add_subdirectory(playground/freetype_atlas)
endif(MOCI_BUILD_PLAYGROUND)

add_subdirectory(playground/gl_extensions)
add_subdirectory(playground/gl_extensions)
2 changes: 1 addition & 1 deletion src/app/playground/cxx_stb_image/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,4 @@ int main(int, char**)
if (buffer != nullptr) { stbi_image_free(buffer); }

return EXIT_SUCCESS;
}
}
2 changes: 1 addition & 1 deletion src/app/playground/freetype_atlas/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ target_link_libraries(${PROJECT_NAME}
Moci::GraphicsExtra
Moci::Application
Moci::Widget
)
)
2 changes: 1 addition & 1 deletion src/app/playground/freetype_atlas/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,4 +106,4 @@ int main(int argc, char** argv)
free(pixels);

return 0;
}
}
2 changes: 1 addition & 1 deletion src/app/playground/gl_extensions/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ auto main() -> int
}

return EXIT_SUCCESS;
}
}
2 changes: 1 addition & 1 deletion src/app/playground/sdl_emscripten/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ target_link_options(sdl_emscripten
"SHELL:-s USE_BOOST_HEADERS=1"
"SHELL:-s USE_SDL=2"
"SHELL:-s WASM=1 -s ALLOW_MEMORY_GROWTH=1 -s NO_EXIT_RUNTIME=0 -s ASSERTIONS=1"
)
)
2 changes: 1 addition & 1 deletion src/app/playground/sdl_emscripten/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,4 +113,4 @@ static auto mainLoop(void* arg) -> void
glClear(GL_COLOR_BUFFER_BIT);
ImGui_ImplOpenGL3_RenderDrawData(ImGui::GetDrawData());
SDL_GL_SwapWindow(app->window);
}
}
2 changes: 1 addition & 1 deletion src/app/sandbox2D/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -143,4 +143,4 @@ class Sandbox : public moci::Application
private:
};

auto moci::createApplication() -> moci::Application* { return new Sandbox(); }
auto moci::createApplication() -> moci::Application* { return new Sandbox(); }
2 changes: 1 addition & 1 deletion src/app/sandbox3D/assets/shader/Texture.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ uniform sampler2D u_Texture;
void main()
{
color = texture(u_Texture, v_TexCoord * 10.0) * u_Color;
}
}
2 changes: 1 addition & 1 deletion src/app/sandbox3D/assets/shader/es2_skybox.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ uniform samplerCube u_Skybox;

varying vec3 v_TexCoords;

void main() { gl_FragColor = textureCube(u_Skybox, v_TexCoords); }
void main() { gl_FragColor = textureCube(u_Skybox, v_TexCoords); }
2 changes: 1 addition & 1 deletion src/app/sandbox3D/assets/shader/gl4_general.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,4 @@ void main()
// texture
vec4 texture = texture2D(u_Texture, v_TexCoords);
color = vec4(light, 1.0) * texture;
}
}
2 changes: 1 addition & 1 deletion src/app/sandbox3D/assets/shader/gl4_light_source.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ layout(location = 0) out vec4 color;

in vec4 v_Color;

void main() { color = v_Color; }
void main() { color = v_Color; }
2 changes: 1 addition & 1 deletion src/app/sandbox3D/assets/shader/gl4_skybox.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ in vec3 v_TexCoords;

uniform samplerCube u_Skybox;

void main() { FragColor = texture(u_Skybox, v_TexCoords); }
void main() { FragColor = texture(u_Skybox, v_TexCoords); }
2 changes: 1 addition & 1 deletion src/app/sandbox3D/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ class Sandbox : public moci::Application
private:
};

moci::Application* moci::createApplication() { return new Sandbox(); }
moci::Application* moci::createApplication() { return new Sandbox(); }
2 changes: 1 addition & 1 deletion src/app/sandboxOpenGL/assets.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ inline auto quadIndices = std::array {
std::uint32_t {2}, //
std::uint32_t {3}, //
};
} // namespace assets
} // namespace assets
2 changes: 1 addition & 1 deletion src/app/sandboxOpenGL/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ class Sandbox : public moci::Application
private:
};

moci::Application* moci::createApplication() { return new Sandbox(); }
moci::Application* moci::createApplication() { return new Sandbox(); }
2 changes: 1 addition & 1 deletion src/app/sandboxOpenGL/opengl_layer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@ class OpenGLLayer final : public moci::Layer
std::shared_ptr<moci::VertexArray> _vao = nullptr;
std::shared_ptr<moci::Texture2D> _texture = nullptr;
std::shared_ptr<moci::Framebuffer> _framebuffer = nullptr;
};
};
2 changes: 1 addition & 1 deletion src/app/tools/embed-resources/test/.gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
basic_gl4.hpp
basic_gl4.cpp
embed_test
a.out
a.out
2 changes: 1 addition & 1 deletion src/app/tools/embed-resources/test/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ int main()
while (getline(input, line)) { std::printf("%s\n", line.c_str()); }

return 0;
}
}
2 changes: 1 addition & 1 deletion src/app/tools/model-viewer/assets/shader/gl4_general.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -77,4 +77,4 @@ void main()
// texture
vec4 texture = texture2D(u_Texture, v_TexCoords);
color = vec4(light, 1.0) * texture;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ layout(location = 0) out vec4 color;

in vec4 v_Color;

void main() { color = v_Color; }
void main() { color = v_Color; }
2 changes: 1 addition & 1 deletion src/app/tools/model-viewer/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -163,4 +163,4 @@ class MociModelViwerApp : public moci::Application
private:
};

auto moci::CreateApplication() -> moci::Application* { return new MociModelViwerApp(); }
auto moci::CreateApplication() -> moci::Application* { return new MociModelViwerApp(); }
2 changes: 1 addition & 1 deletion src/app/tools/profile-viewer/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -140,4 +140,4 @@ cython_debug/

# static files generated from Django application using `collectstatic`
media
static
static
2 changes: 1 addition & 1 deletion src/app/tools/profile-viewer/profile_viewer_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@

def test_standard_deviation():
assert pv.standard_deviation([0]) == 0
assert pv.standard_deviation([1,0]) == 0.5
assert pv.standard_deviation([1,0]) == 0.5
2 changes: 1 addition & 1 deletion src/moci/application/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ target_link_libraries(moci_application
PUBLIC
Moci::RenderApi
Moci::CodeCoverage
)
)
2 changes: 1 addition & 1 deletion src/moci/application/application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,4 +109,4 @@ auto Application::onWindowResize(WindowResizeEvent& e) -> bool
return false;
}

} // namespace moci
} // namespace moci
2 changes: 1 addition & 1 deletion src/moci/application/application.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,4 @@ class Application
// To be defined in CLIENT
auto createApplication() -> Application*;

} // namespace moci
} // namespace moci
2 changes: 1 addition & 1 deletion src/moci/application/entry_point.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ int main(int argc, char** argv)
return EXIT_SUCCESS;
}

#endif
#endif
2 changes: 1 addition & 1 deletion src/moci/application/glfw/input.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,4 @@ auto GlfwInput::getMouseYImpl() -> float
return y;
}

} // namespace moci
} // namespace moci
2 changes: 1 addition & 1 deletion src/moci/application/glfw/input.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ class GlfwInput : public Input
auto getMouseYImpl() -> float override;
};

} // namespace moci
} // namespace moci
2 changes: 1 addition & 1 deletion src/moci/application/glfw/window.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,4 @@ class GlfwWindow : public Window
std::uint32_t _frameCounter {};
};

} // namespace moci
} // namespace moci
2 changes: 1 addition & 1 deletion src/moci/application/window.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,4 @@ class Window
[[nodiscard]] virtual auto getNativeWindow() const -> void* = 0;
};

} // namespace moci
} // namespace moci
1 change: 0 additions & 1 deletion src/moci/core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -78,4 +78,3 @@ target_link_libraries(moci_core_tests
Moci::CodeCoverage
Catch2::Catch2
)

2 changes: 1 addition & 1 deletion src/moci/core/geometry/line.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -132,4 +132,4 @@ auto operator!=(Line<Type> const lhs, Line<Type> const rhs) -> bool
return !(lhs == rhs);
}

} // namespace moci
} // namespace moci
2 changes: 1 addition & 1 deletion src/moci/core/geometry/line.test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -137,4 +137,4 @@ TEST_CASE("math/geometry: LineOperatorNotEqual", "[geometry]")
constexpr auto l2 = moci::Line<int>({1, 2}, {1, 1});
REQUIRE(l1 != l2);
}
}
}
2 changes: 1 addition & 1 deletion src/moci/core/geometry/point.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@ constexpr auto operator!=(Point<Type> lhs, Point<Type> rhs) -> bool
return !(lhs == rhs);
}

} // namespace moci
} // namespace moci
2 changes: 1 addition & 1 deletion src/moci/core/geometry/point.test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,4 +81,4 @@ TEST_CASE("math/geometry: PointOperatorNotEqual", "[geometry]")
constexpr auto p2 = moci::Point<int>(1, 2);
REQUIRE(p1 != p2);
}
}
}
2 changes: 1 addition & 1 deletion src/moci/core/geometry/rectangle.cpp
Original file line number Diff line number Diff line change
@@ -1 +1 @@
#include "rectangle.hpp"
#include "rectangle.hpp"
2 changes: 1 addition & 1 deletion src/moci/core/geometry/rectangle.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -239,4 +239,4 @@ auto operator!=(Rectangle<Type> const r1, Rectangle<Type> const r2) -> bool
return !(r1 == r2);
}

} // namespace moci
} // namespace moci
2 changes: 1 addition & 1 deletion src/moci/core/geometry/rectangle.test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -267,4 +267,4 @@ TEST_CASE("math/geometry: RectangleOperatorNotEqual", "[geometry]")
constexpr auto r2 = moci::Rectangle<int>({1, 2}, 1, 1);
REQUIRE(r1 != r2);
}
}
}
2 changes: 1 addition & 1 deletion src/moci/core/logging.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ void Log::init()
sClientLogger->flush_on(spdlog::level::trace);
}

} // namespace moci
} // namespace moci
2 changes: 1 addition & 1 deletion src/moci/core/network/datagram.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@ void DatagramSocket::setMessageCallback(const std::function<void(Buffer const&,
{
_pimpl->setMessageCallback(callback);
}
} // namespace moci
} // namespace moci
2 changes: 1 addition & 1 deletion src/moci/core/network/datagram.test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ TEST_CASE("network: UDPBindToPort", "[network]")
REQUIRE(udp.bind("", 0) == true);
}

#endif
#endif
2 changes: 1 addition & 1 deletion src/moci/core/network/unix/datagram.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,4 @@ class DatagramSocket::Pimpl
};
} // namespace moci

#endif
#endif
2 changes: 1 addition & 1 deletion src/moci/core/network/windows/datagram.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,4 +113,4 @@ void DatagramSocket::Pimpl::shutdown()

} // namespace moci

#endif
#endif
2 changes: 1 addition & 1 deletion src/moci/core/network/windows/datagram.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,4 @@ class DatagramSocket::Pimpl
};
} // namespace moci

#endif
#endif
Loading

0 comments on commit 2c82148

Please sign in to comment.