[smuxi: 84/179] Engine: remove some commented code
- From: Mirco M. M. Bauer <mmmbauer src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [smuxi: 84/179] Engine: remove some commented code
- Date: Sat, 4 Nov 2017 05:46:06 +0000 (UTC)
commit 63e71fd2afd7b76317546d2e33b558068a302bd8
Author: Andres G. Aragoneses <knocte gmail com>
Date: Tue Oct 18 12:22:11 2016 +0800
Engine: remove some commented code
This commented code doesn't have a comment that states its
reason for still existing in the master branch, so it's
better to remove it because it's just noise.
src/Engine/Persons/ContactModel.cs | 14 --------------
1 files changed, 0 insertions(+), 14 deletions(-)
---
diff --git a/src/Engine/Persons/ContactModel.cs b/src/Engine/Persons/ContactModel.cs
index ac23122..4fff6d2 100644
--- a/src/Engine/Persons/ContactModel.cs
+++ b/src/Engine/Persons/ContactModel.cs
@@ -176,25 +176,11 @@ namespace Smuxi.Engine
crc.ComputeHash(Encoding.UTF8.GetBytes(normalized));
var hash = crc.CrcValue;
var upper24 = hash >> 8;
- /*
- var lower24 = hash & 0xFFFFFFU;
- var merged = upper24 ^ lower24;
- var rotated = (hash >> 16) | ((hash & 0xFFFFU) << 16);
- */
uint flippedHash = (hash >> 16) | (hash << 16);
var flippedMergedHash = (flippedHash >> 8) ^ (flippedHash & 0xFFFFFFU);
name.ForegroundColor = new TextColor(upper24);
name.BackgroundColor = new TextColor(flippedMergedHash);
- /*
- MD5CryptoServiceProvider csp = new MD5CryptoServiceProvider();
- var md5hash = csp.ComputeHash(Encoding.UTF8.GetBytes(normalized));
- var fgHash = BitConverter.ToUInt32(md5hash, 0);
- var bgHash = BitConverter.ToUInt32(md5hash, 4);
- name.ForegroundColor = new TextColor(fgHash >> 8);
- name.BackgroundColor = new TextColor(bgHash >> 8);
- */
-
return name;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]