aboutsummaryrefslogtreecommitdiffstats
path: root/chilbert/SetBits.hpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2018-08-19 17:09:03 +0200
committerDavid Robillard <d@drobilla.net>2018-09-29 14:49:17 +0200
commit0013efd3cc0c2aa9150c983babd52d3de8e32744 (patch)
tree221316a01103a25decc2866c581125c5465e1c5e /chilbert/SetBits.hpp
parentff4d8986a35b6a67a2162208145371fcf427d040 (diff)
downloadchilbert-0013efd3cc0c2aa9150c983babd52d3de8e32744.tar.gz
chilbert-0013efd3cc0c2aa9150c983babd52d3de8e32744.tar.bz2
chilbert-0013efd3cc0c2aa9150c983babd52d3de8e32744.zip
Clean up implementation header and inline code used only there
Diffstat (limited to 'chilbert/SetBits.hpp')
-rw-r--r--chilbert/SetBits.hpp44
1 files changed, 0 insertions, 44 deletions
diff --git a/chilbert/SetBits.hpp b/chilbert/SetBits.hpp
deleted file mode 100644
index cc5d602..0000000
--- a/chilbert/SetBits.hpp
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- Copyright (C) 2018 David Robillard <d@drobilla.net>
- Copyright (C) 2006-2007 Chris Hamilton <chamilton@cs.dal.ca>
-
- This program is free software: you can redistribute it and/or modify it under
- the terms of the GNU General Public License as published by the Free Software
- Foundation, either version 2 of the License, or (at your option) any later
- version.
-
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
- details.
-
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <https://www.gnu.org/licenses/>.
-*/
-
-#ifndef CHILBERT_SETBITS_HPP
-#define CHILBERT_SETBITS_HPP
-
-#include "chilbert/Operations.hpp"
-
-namespace chilbert {
-
-/** Set a range of bits in one field from the start of another.
- *
- * @param h Destination bit field
- * @param n Number of bits
- * @param i Start bit index in destination
- * @param w Source bit field
- */
-template <class H, class I>
-inline void
-set_bits(H& h, const size_t n, const size_t i, const I& w)
-{
- for (size_t j = 0; j < n; j++) {
- set_bit(h, i + j, test_bit(w, j));
- }
-}
-
-} // namespace chilbert
-
-#endif