"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "support/BitChord.h" between
muscle7.61.zip and muscle7.62.zip

About: MUSCLE (Multi User Server Client Linking Environment) is a messaging server and networking API. The included server program ("muscled") lets its clients message each other, and/or store information in its serverside hierarchical database.

BitChord.h  (muscle7.61):BitChord.h  (muscle7.62)
skipping to change at line 485 skipping to change at line 485
{ {
String ret; (void) ret.Prealloc(1+(NUM_BYTES*3)); String ret; (void) ret.Prealloc(1+(NUM_BYTES*3));
for (int32 i=NUM_BYTES-1; i>=0; i--) for (int32 i=NUM_BYTES-1; i>=0; i--)
{ {
char buf[4]; muscleSprintf(buf, "%s%02x", (ret.IsEmpty())?"":" ", GetBy te(i)); char buf[4]; muscleSprintf(buf, "%s%02x", (ret.IsEmpty())?"":" ", GetBy te(i));
ret += buf; ret += buf;
} }
return ret; return ret;
} }
/** Returns a fixed-length binary representation of this bit-chord. */
String ToBinaryString() const
{
String ret; (void) ret.Prealloc(NumBits+1);
for (int32 i=NumBits-1; i>=0; i--) ret += IsBitSet(i)?'1':'0';
return ret;
}
/** Sets a given 32-bit word full of bits in our internal words-array. /** Sets a given 32-bit word full of bits in our internal words-array.
* Don't call this unless you know what you're doing! * Don't call this unless you know what you're doing!
* @param whichWord index of the word to set * @param whichWord index of the word to set
* @param wordValue the new value for the specified word. * @param wordValue the new value for the specified word.
*/ */
void SetWord(uint32 whichWord, uint32 wordValue) void SetWord(uint32 whichWord, uint32 wordValue)
{ {
MASSERT(whichWord < NUM_WORDS, "BitChord::SetWord: whichWord was out of r ange!\n"); MASSERT(whichWord < NUM_WORDS, "BitChord::SetWord: whichWord was out of r ange!\n");
_words[whichWord] = wordValue; _words[whichWord] = wordValue;
if ((whichWord+1) == NUM_WORDS) ClearUnusedBits(); // keep us normalized if ((whichWord+1) == NUM_WORDS) ClearUnusedBits(); // keep us normalized
 End of changes. 1 change blocks. 
0 lines changed or deleted 8 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)