// GetTO returns its Transfer Object
330966
func (u *UserPostLock) GetTO(users ...*User) *UserPostLockTO {
	var userInfo *InfoTO
	if user, e := NewUser(u.User); e == nil {
		userInfo = user.Info().GetTO()
	}
	return &UserPostLockTO{
		original:  u,
		User:      userInfo,
		Hpid:      u.Hpid,
		Time:      u.Time,
		Timestamp: u.Time.Unix(),
		Counter:   u.Counter,
	}
}
416080
func (b *BitSet) SetTo(i uint, value bool) *BitSet {
	if value {
		return b.Set(i)
	}
	return b.Clear(i)
}
138995
func (s *Range) SetTo(v int64) *Range {
	s.To = &v
	return s
}
1235959
func (m *ProjectMember) GetTO(users ...*User) *ProjectMemberTO {
	var fromInfo, toInfo *InfoTO
	if from, e := NewUser(m.From); e == nil {
		fromInfo = from.Info().GetTO()
	}
	if to, e := NewProject(m.To); e == nil {
		toInfo = to.Info().GetTO()
	}
	return &ProjectMemberTO{
		original:  m,
		FromInfo:  fromInfo,
		ToInfo:    toInfo,
		Time:      m.Time,
		Timestamp: m.Time.Unix(),
		ToNotify:  m.ToNotify,
		Counter:   m.Counter,
	}
}
667916
func (f *fifoProcessor) PullTo(cnx redis.Conn, src, dest string,
	timeout time.Duration) ([]byte, error) {

	bytes, err := redis.Bytes(cnx.Do("BRPOPLPUSH", src, dest, block(timeout)))
	if err != nil {
		return nil, err
	}

	return bytes, nil
}
899755
func (s *DoubleRange) SetTo(v float64) *DoubleRange {
	s.To = &v
	return s
}
1191558
func (tx *Transaction) To() *common.Address {
	if tx.data.Recipient == nil {
		return nil
	}
	to := *tx.data.Recipient
	return &to
}
983316
func (p *ProjectPost) GetTO(users ...*User) *PostTO {
	if len(users) != 1 {
		panic("ProjectPost.GetTO requires a user parameter")
	}
	user := users[0]
	postTO := p.Post.GetTO()
	postTO.Type = ProjectBoardID

	if from, e := NewUser(p.From); e == nil {
		postTO.FromInfo = from.Info().GetTO()
	}
	if to, e := NewProject(p.To); e == nil {
		postTO.ToInfo = to.Info().GetTO()
	}

	postTO.Rate = p.VotesCount()
	postTO.RevisionsCount = p.RevisionsNumber()
	postTO.CommentsCount = p.CommentsCount()
	postTO.BookmarksCount = p.BookmarksCount()
	postTO.LurkersCount = p.LurkersCount()
	postTO.Timestamp = p.Time.Unix()
	postTO.URL = p.URL().String()
	postTO.CanBookmark = user.CanBookmark(p)
	postTO.CanComment = user.CanComment(p)
	postTO.CanDelete = user.CanDelete(p)
	postTO.CanEdit = user.CanEdit(p)
	postTO.CanLurk = user.CanLurk(p)
	return postTO
}
232529
func (c *CommitStats) GetTotal() int {
	if c == nil || c.Total == nil {
		return 0
	}
	return *c.Total
}
386628
func (p *PoolData) CopyTo(dstP *PoolData) error {
	dstP.ParentKey = p.ParentKey
	dstP.Pool = types.GetIPNetCopy(p.Pool)

	if p.Range != nil {
		dstP.Range = &AddressRange{}
		dstP.Range.Sub = types.GetIPNetCopy(p.Range.Sub)
		dstP.Range.Start = p.Range.Start
		dstP.Range.End = p.Range.End
	}

	dstP.RefCount = p.RefCount
	return nil
}
116801
func (c *ProjectPostComment) GetTO(users ...*User) *ProjectPostCommentTO {
	if len(users) != 1 {
		panic("ProjectPostComment.GetTO requires a user parameter")
	}
	user := users[0]

	var fromInfo, toInfo *InfoTO
	if from, e := NewUser(c.From); e == nil {
		fromInfo = from.Info().GetTO()
	}

	if to, e := NewProject(c.To); e == nil {
		toInfo = to.Info().GetTO()
	}
	return &ProjectPostCommentTO{
		original:  c,
		Hcid:      c.Hcid,
		Hpid:      c.Hpid,
		FromInfo:  fromInfo,
		ToInfo:    toInfo,
		Message:   c.Message,
		Lang:      c.Lang,
		Time:      c.Time,
		Timestamp: c.Time.Unix(),
		CanDelete: user.CanDelete(c),
		CanEdit:   user.CanEdit(c),
	}
}
775698
func (p *PersonalInfo) GetTO() *PersonalInfoTO {
	return &PersonalInfoTO{
		original:  p,
		IsOnline:  p.IsOnline,
		Nation:    p.Nation,
		Timezone:  p.Timezone,
		Username:  p.Username,
		Name:      p.Name,
		Surname:   p.Surname,
		Gender:    p.Gender,
		Birthday:  p.Birthday,
		Gravatar:  p.Gravatar.String(),
		Interests: p.Interests,
		Quotes:    p.Quotes,
		Biography: p.Biography,
	}
}
643095
func (c *client) getRTT() string {
	if c.rtt == 0 {
		// If a real client, go ahead and send ping now to get a value
		// for RTT. For tests and telnet, or if client is closing, etc skip.
		if !c.flags.isSet(clearConnection) && c.flags.isSet(connectReceived) && c.opts.Lang != "" {
			c.sendPing()
		}
		return ""
	}
	var rtt time.Duration
	if c.rtt > time.Microsecond && c.rtt < time.Millisecond {
		rtt = c.rtt.Truncate(time.Microsecond)
	} else {
		rtt = c.rtt.Truncate(time.Millisecond)
	}
	return rtt.String()
}
1100235
func (u *User) GetTO(users ...*User) *UserTO {
	return &UserTO{
		original:         u,
		Counter:          u.Counter,
		Last:             u.Last,
		NotifyStory:      u.NotifyStory,
		Private:          u.Private,
		Lang:             u.Lang,
		Username:         u.Username,
		Name:             u.Name,
		Surname:          u.Surname,
		Gender:           u.Gender,
		BirthDate:        u.BirthDate,
		BoardLang:        u.BoardLang,
		Timezone:         u.Timezone,
		Viewonline:       u.Viewonline,
		RegistrationTime: u.RegistrationTime,
		Profile: ProfileTO{
			Counter:        u.Profile.Counter,
			Website:        u.Profile.Website,
			Quotes:         strings.Split(u.Profile.Quotes, "\n"),
			Biography:      u.Profile.Biography,
			Interests:      u.Interests(),
			Github:         u.Profile.Github,
			Skype:          u.Profile.Skype,
			Jabber:         u.Profile.Jabber,
			Yahoo:          u.Profile.Yahoo,
			Userscript:     u.Profile.Userscript,
			Template:       u.Profile.Template,
			MobileTemplate: u.Profile.MobileTemplate,
			Dateformat:     u.Profile.Dateformat,
			Facebook:       u.Profile.Facebook,
			Twitter:        u.Profile.Twitter,
			Steam:          u.Profile.Steam,
			Push:           u.Profile.Push,
			Pushregtime:    u.Profile.Pushregtime,
			Closed:         u.Profile.Closed,
		},
	}
}
899638
func (w *WeeklyCommitActivity) GetTotal() int {
	if w == nil || w.Total == nil {
		return 0
	}
	return *w.Total
}
788778
func (bm *BlockMeta) MarshalTo(data []byte) (int, error) {
	bs, err := bm.Marshal()
	if err != nil {
		return -1, err
	}
	return copy(data, bs), nil
}
1346701
func (c *CodeSearchResult) GetTotal() int {
	if c == nil || c.Total == nil {
		return 0
	}
	return *c.Total
}