Remove std:: prefixes from C functions in talk/.
std::memcpy -> memcpy for instance. This change was motivated by a compile report complaining that std::rand() was used instead of rand(), probably with a stdlib.h include instead of cstdlib. Use of C functions without the std:: prefix is a lot more common, so removing std:: to address this. BUG= R=tommi@webrtc.org Review URL: https://webrtc-codereview.appspot.com/9559004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@5657 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
@@ -25,11 +25,11 @@
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <math.h>
|
||||
#include <time.h>
|
||||
#ifdef POSIX
|
||||
#include <netinet/in.h>
|
||||
#endif
|
||||
#include <cmath>
|
||||
|
||||
#include "talk/base/logging.h"
|
||||
#include "talk/base/gunit.h"
|
||||
@@ -686,7 +686,7 @@ class VirtualSocketServerTest : public testing::Test {
|
||||
double num =
|
||||
receiver.samples * receiver.sum_sq - receiver.sum * receiver.sum;
|
||||
double den = receiver.samples * (receiver.samples - 1);
|
||||
const double sample_stddev = std::sqrt(num / den);
|
||||
const double sample_stddev = sqrt(num / den);
|
||||
LOG(LS_VERBOSE) << "mean=" << sample_mean << " stddev=" << sample_stddev;
|
||||
|
||||
EXPECT_LE(500u, receiver.samples);
|
||||
@@ -1002,7 +1002,7 @@ TEST_F(VirtualSocketServerTest, CreatesStandardDistribution) {
|
||||
double dev = (*f)[i].second - mean;
|
||||
sum_sq_dev += dev * dev;
|
||||
}
|
||||
const double stddev = std::sqrt(sum_sq_dev / f->size());
|
||||
const double stddev = sqrt(sum_sq_dev / f->size());
|
||||
EXPECT_NEAR(kTestMean[midx], mean, 0.1 * kTestMean[midx])
|
||||
<< "M=" << kTestMean[midx]
|
||||
<< " SD=" << kStdDev
|
||||
|
||||
Reference in New Issue
Block a user