From 14a212bb571808aa7388c9201b7abcaa147fdad3 Mon Sep 17 00:00:00 2001
From: Claudio Hoffmann <hoffmanncl72341@th-nuernberg.de>
Date: Tue, 19 Jan 2021 18:57:06 +0100
Subject: [PATCH] Final snake_case!

---
 PixelBuffer.cpp  | 4 ++--
 PixelBuffer.hpp  | 8 ++++----
 PixelShaders.cpp | 4 ++--
 PixelShaders.hpp | 4 ++--
 player.cpp       | 2 +-
 player.hpp       | 2 +-
 6 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/PixelBuffer.cpp b/PixelBuffer.cpp
index d1696e6..3348a7b 100644
--- a/PixelBuffer.cpp
+++ b/PixelBuffer.cpp
@@ -10,7 +10,7 @@ Color PixelBuffer::peek(PixelPoint const& pos) const
 	if(pos.x < 0 || pos.x >= w() || pos.y < 0 || pos.y >= h()) {
 		return _t;
 	}
-	return peekUnchecked(pos);
+	return peek_unchecked(pos);
 }
 
 PixelIterator PixelBuffer::begin() const
@@ -32,7 +32,7 @@ DynamicPixelBuffer::DynamicPixelBuffer(int w, int h)
 {
 }
 
-Color DynamicPixelBuffer::peekUnchecked(PixelPoint const &pos) const
+Color DynamicPixelBuffer::peek_unchecked(PixelPoint const &pos) const
 {
 	return buffer[(pos.y * w()) + pos.x];
 };
diff --git a/PixelBuffer.hpp b/PixelBuffer.hpp
index 55d73d3..ecc2ef8 100644
--- a/PixelBuffer.hpp
+++ b/PixelBuffer.hpp
@@ -73,7 +73,7 @@ protected:
 
 	// Safe version of peek(), implemented by derived classes. [pos] is
 	// guaranteed to be ≥ (0, 0) and < (width, height).
-	virtual Color peekUnchecked(PixelPoint const &pos) const = 0;
+	virtual Color peek_unchecked(PixelPoint const &pos) const = 0;
 
 public:
 	int const w() const { return width; }
@@ -104,7 +104,7 @@ public:
 	}
 
 	PixelPoint const& pos() const { return position; }
-	Color peek() const            { return buffer->peekUnchecked(position); }
+	Color peek() const            { return buffer->peek_unchecked(position); }
 
 	void operator ++() {
 		position.x++;
@@ -139,7 +139,7 @@ public:
 		: PixelBuffer(W, H), buffer(filter_null_terminators(chars)) {
 	}
 
-	Color peekUnchecked(PixelPoint const &pos) const {
+	Color peek_unchecked(PixelPoint const &pos) const {
 		return buffer[pos.y][pos.x];
 	};
 
@@ -185,7 +185,7 @@ class DynamicPixelBuffer : public PixelBuffer {
 public:
 	DynamicPixelBuffer(int w, int h);
 
-	Color peekUnchecked(PixelPoint const &pos) const;
+	Color peek_unchecked(PixelPoint const &pos) const;
 	// Returns [trap] if [pos] is outside the buffer boundaries.
 	Color& at(PixelPoint const &pos);
 	void clear(Color ch = {});
diff --git a/PixelShaders.cpp b/PixelShaders.cpp
index 376ec5e..a5c1f33 100644
--- a/PixelShaders.cpp
+++ b/PixelShaders.cpp
@@ -15,7 +15,7 @@ public:
 	}
 } rng;
 
-Color HitShader::peekUnchecked(PixelPoint const &pos) const
+Color HitShader::peek_unchecked(PixelPoint const &pos) const
 {
 	auto dist = std::uniform_real_distribution<float>{ percent };
 	auto src = input.peek(pos);
@@ -25,7 +25,7 @@ Color HitShader::peekUnchecked(PixelPoint const &pos) const
 	return (dist(rng.rng) > 0.95f) ? color : (is_final ? _t : src);
 }
 
-Color DiagonalFadeoutShader::peekUnchecked(PixelPoint const &pos) const
+Color DiagonalFadeoutShader::peek_unchecked(PixelPoint const &pos) const
 {
 	// (percent * 1) would only correspond to the top-left triangle.
 	auto src = input.peek(pos);
diff --git a/PixelShaders.hpp b/PixelShaders.hpp
index bb20dc2..a94aa90 100644
--- a/PixelShaders.hpp
+++ b/PixelShaders.hpp
@@ -18,7 +18,7 @@ public:
 		is_final(is_final) {
 	}
 
-	virtual Color peekUnchecked(PixelPoint const &pos) const;
+	virtual Color peek_unchecked(PixelPoint const &pos) const;
 };
 
 class DiagonalFadeoutShader : public ShadedPixelBuffer {
@@ -29,7 +29,7 @@ public:
 		ShadedPixelBuffer(input), percent(percent) {
 	}
 
-	virtual Color peekUnchecked(PixelPoint const &pos) const;
+	virtual Color peek_unchecked(PixelPoint const &pos) const;
 };
 
 #endif /* PIXELSHADERS_HPP */
diff --git a/player.cpp b/player.cpp
index e142ba6..72b48f5 100644
--- a/player.cpp
+++ b/player.cpp
@@ -131,7 +131,7 @@ Player::Shader::Shader(Player const &player) :
 {
 }
 //hoffmanncl72341----------------------------
-Color Player::Shader::peekUnchecked(PixelPoint const &pos) const
+Color Player::Shader::peek_unchecked(PixelPoint const &pos) const
 {
     auto const &basesprite = [this]() {
         //hoffmanncl72341----------------------------
diff --git a/player.hpp b/player.hpp
index aaa14cd..a7235d2 100644
--- a/player.hpp
+++ b/player.hpp
@@ -17,7 +17,7 @@ protected:
     // sprite...
     class Shader : public PixelBuffer {
     protected:
-        virtual Color peekUnchecked(PixelPoint const &pos) const;
+        virtual Color peek_unchecked(PixelPoint const &pos) const;
     public:
         Player const &player;
 
-- 
GitLab