Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(391)

Side by Side Diff: third_party/WebKit/Source/modules/webaudio/AudioParam.cpp

Issue 2696183002: Migrate WTF::HashSet::remove() to ::erase() [part 1] (Closed)
Patch Set: one more platform-specific reference Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 295
296 output.addParam(*this); 296 output.addParam(*this);
297 m_outputs.insert(&output); 297 m_outputs.insert(&output);
298 changedOutputs(); 298 changedOutputs();
299 } 299 }
300 300
301 void AudioParamHandler::disconnect(AudioNodeOutput& output) { 301 void AudioParamHandler::disconnect(AudioNodeOutput& output) {
302 ASSERT(deferredTaskHandler().isGraphOwner()); 302 ASSERT(deferredTaskHandler().isGraphOwner());
303 303
304 if (m_outputs.contains(&output)) { 304 if (m_outputs.contains(&output)) {
305 m_outputs.remove(&output); 305 m_outputs.erase(&output);
306 changedOutputs(); 306 changedOutputs();
307 output.removeParam(*this); 307 output.removeParam(*this);
308 } 308 }
309 } 309 }
310 310
311 int AudioParamHandler::computeQHistogramValue(float newValue) const { 311 int AudioParamHandler::computeQHistogramValue(float newValue) const {
312 // For the Q value, assume a useful range is [0, 25] and that 0.25 dB 312 // For the Q value, assume a useful range is [0, 25] and that 0.25 dB
313 // resolution is good enough. Then, we can map the floating point Q value (in 313 // resolution is good enough. Then, we can map the floating point Q value (in
314 // dB) to an integer just by multipling by 4 and rounding. 314 // dB) to an integer just by multipling by 4 and rounding.
315 newValue = clampTo(newValue, 0.0, 25.0); 315 newValue = clampTo(newValue, 0.0, 25.0);
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
517 return this; 517 return this;
518 } 518 }
519 519
520 AudioParam* AudioParam::cancelAndHoldAtTime(double startTime, 520 AudioParam* AudioParam::cancelAndHoldAtTime(double startTime,
521 ExceptionState& exceptionState) { 521 ExceptionState& exceptionState) {
522 handler().timeline().cancelAndHoldAtTime(startTime, exceptionState); 522 handler().timeline().cancelAndHoldAtTime(startTime, exceptionState);
523 return this; 523 return this;
524 } 524 }
525 525
526 } // namespace blink 526 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698