@simonmichal commented on this pull request.


In src/XrdCms/XrdCmsRRQ.hh:

> -        Info(): Add2Q(0), PBack(0), Resp(0), Multi(0), luFast(0), luSlow(0),
-                rdFast(0), rdSlow(0) {}
+        Info()
+	{Reset();}
+	
+	void Reset()
+	{Add2Q  = 0;
+	 PBack  = 0;
+	 Resp   = 0;
+	 Multi  = 0;
+	 luFast = 0;
+	 luSlow = 0;
+	 rdFast = 0;
+	 rdSlow = 0;
+	}
+

The reason I add the 'Reset' method is here:

60da79d#diff-bffded318632dc8e33cbdb6c4dcc1d34L134

In XrdCmsRRQ.cc the compiler was complaining that an object with a non-trivial constructor is being initialized with memset. As the constructor does basically the same as 'Reset' I though that implementing the constructor in terms of 'Reset' method would simplify the code. IMHO the compiler will be smart enough to first inline 'Reset' and then the constructor. That said, I don't have any strong feelings on this one, I can revert to the old constructor implementation if you wish (as long as the 'Reset' stays).


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/xrootd/xrootd","title":"xrootd/xrootd","subtitle":"GitHub repository","main_image_url":"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open in GitHub","url":"https://github.com/xrootd/xrootd"}},"updates":{"snippets":[{"icon":"PERSON","message":"@simonmichal commented on #657"}],"action":{"name":"View Pull Request","url":"https://github.com/xrootd/xrootd/pull/657#discussion_r167491184"}}}

Use REPLY-ALL to reply to list

To unsubscribe from the XROOTD-DEV list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=XROOTD-DEV&A=1