Removed obsolete function SetBitAt

- fix #27
This commit is contained in:
Federico Barresi
2022-05-18 14:35:26 +02:00
parent 5a3c85c5f7
commit e5836c4283
3 changed files with 7 additions and 7 deletions

View File

@@ -1,6 +1,12 @@
# Change Log
All notable changed to this project will be documented in this file.
## [1.1.81] - 18.05.2022
### Added
### Changed
### Fixed
- Removed obsolete SetBitAt [#27](https://github.com/fbarresi/Sharp7/issues/27)
## [1.1.80] - 18.05.2022
### Added
### Changed

View File

@@ -25,7 +25,7 @@ namespace Sharp7.Tests
[Fact] public void TestGetBitAt() { S7.GetBitAt(new byte[] {1,2,3,4}, 0, 0).ShouldBe(true); }
[Fact] public void TestSetBitAt() {
var buffer = new byte[] {1,2,3,4};
S7.SetBitAt(ref buffer, 0, 1, true);
S7.SetBitAt(buffer, 0, 1, true);
buffer.ShouldBe(new byte[] {3, 2, 3, 4});
}
[Fact] public void TestSetBitAtAsExtensionMethod() {

View File

@@ -49,12 +49,6 @@ namespace Sharp7
return (buffer[pos] & Mask[bit]) != 0;
}
[Obsolete("Use SetBitAt as extension method")]
public static void SetBitAt(ref byte[] buffer, int pos, int bit, bool value)
{
buffer.SetBitAt(pos, bit, value);
}
public static void SetBitAt(this byte[] buffer, int pos, int bit, bool value)
{
byte[] Mask = {0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80};