From 382784526c6071680695603f61bc067683453f5e Mon Sep 17 00:00:00 2001 From: zimoch Date: Fri, 4 Feb 2011 15:11:57 +0000 Subject: [PATCH] make markbit small enough to be inlined on solaris --- src/StreamFormatConverter.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/StreamFormatConverter.cc b/src/StreamFormatConverter.cc index 9912e7d..2d1414d 100644 --- a/src/StreamFormatConverter.cc +++ b/src/StreamFormatConverter.cc @@ -597,12 +597,13 @@ class StdCharsetConverter : public StreamFormatConverter inline void markbit(StreamBuffer& info, bool notflag, char c) { - const char mask [8] = {0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80}; + char &infobyte = info[c>>3]; + char mask = 1<<(c&7); if (notflag) - info[c>>3] |= mask[c&7]; + infobyte |= mask; else - info[c>>3] &= ~mask[c&7]; + infobyte &= ~mask; } int StdCharsetConverter::