| @@ -478,7 +478,7 @@ public: | |||
| if (svgFileStream != nullptr) | |||
| { | |||
| svgDrawable = dynamic_cast <DrawableComposite*> (Drawable::createFromImageDataStream (*svgFileStream)); | |||
| svgDrawable = dynamic_cast<DrawableComposite*> (Drawable::createFromImageDataStream (*svgFileStream)); | |||
| if (svgDrawable != nullptr) | |||
| { | |||
| @@ -287,7 +287,7 @@ private: | |||
| int indexToRemove = Random::getSystemRandom().nextInt (balls.size()); | |||
| if (isUsingPool) | |||
| pool.removeJob (dynamic_cast <DemoThreadPoolJob*> (balls [indexToRemove]), true, 4000); | |||
| pool.removeJob (dynamic_cast<DemoThreadPoolJob*> (balls [indexToRemove]), true, 4000); | |||
| balls.remove (indexToRemove); | |||
| } | |||
| @@ -89,7 +89,7 @@ public: | |||
| void changeListenerCallback (ChangeBroadcaster* source) override | |||
| { | |||
| if (ColourSelector* cs = dynamic_cast <ColourSelector*> (source)) | |||
| if (ColourSelector* cs = dynamic_cast<ColourSelector*> (source)) | |||
| setColour (TextButton::buttonColourId, cs->getCurrentColour()); | |||
| } | |||
| }; | |||
| @@ -267,7 +267,7 @@ void FilterGraph::setLastDocumentOpened (const File& file) | |||
| //============================================================================== | |||
| static XmlElement* createNodeXml (AudioProcessorGraph::Node* const node) noexcept | |||
| { | |||
| AudioPluginInstance* plugin = dynamic_cast <AudioPluginInstance*> (node->getProcessor()); | |||
| AudioPluginInstance* plugin = dynamic_cast<AudioPluginInstance*> (node->getProcessor()); | |||
| if (plugin == nullptr) | |||
| { | |||
| @@ -447,7 +447,7 @@ public: | |||
| { | |||
| for (int i = 0; i < getNumChildComponents(); ++i) | |||
| { | |||
| if (PinComponent* const pc = dynamic_cast <PinComponent*> (getChildComponent(i))) | |||
| if (PinComponent* const pc = dynamic_cast<PinComponent*> (getChildComponent(i))) | |||
| { | |||
| const int total = pc->isInput ? numIns : numOuts; | |||
| const int index = pc->index == FilterGraph::midiChannelNumber ? (total - 1) : pc->index; | |||
| @@ -463,7 +463,7 @@ public: | |||
| { | |||
| for (int i = 0; i < getNumChildComponents(); ++i) | |||
| { | |||
| if (PinComponent* const pc = dynamic_cast <PinComponent*> (getChildComponent(i))) | |||
| if (PinComponent* const pc = dynamic_cast<PinComponent*> (getChildComponent(i))) | |||
| { | |||
| if (pc->index == index && isInput == pc->isInput) | |||
| { | |||
| @@ -839,7 +839,7 @@ FilterComponent* GraphEditorPanel::getComponentForFilter (const uint32 filterID) | |||
| { | |||
| for (int i = getNumChildComponents(); --i >= 0;) | |||
| { | |||
| if (FilterComponent* const fc = dynamic_cast <FilterComponent*> (getChildComponent (i))) | |||
| if (FilterComponent* const fc = dynamic_cast<FilterComponent*> (getChildComponent (i))) | |||
| if (fc->filterID == filterID) | |||
| return fc; | |||
| } | |||
| @@ -851,7 +851,7 @@ ConnectorComponent* GraphEditorPanel::getComponentForConnection (const AudioProc | |||
| { | |||
| for (int i = getNumChildComponents(); --i >= 0;) | |||
| { | |||
| if (ConnectorComponent* const c = dynamic_cast <ConnectorComponent*> (getChildComponent (i))) | |||
| if (ConnectorComponent* const c = dynamic_cast<ConnectorComponent*> (getChildComponent (i))) | |||
| if (c->sourceFilterID == conn.sourceNodeId | |||
| && c->destFilterID == conn.destNodeId | |||
| && c->sourceFilterChannel == conn.sourceChannelIndex | |||
| @@ -866,10 +866,10 @@ PinComponent* GraphEditorPanel::findPinAt (const int x, const int y) const | |||
| { | |||
| for (int i = getNumChildComponents(); --i >= 0;) | |||
| { | |||
| if (FilterComponent* fc = dynamic_cast <FilterComponent*> (getChildComponent (i))) | |||
| if (FilterComponent* fc = dynamic_cast<FilterComponent*> (getChildComponent (i))) | |||
| { | |||
| if (PinComponent* pin = dynamic_cast <PinComponent*> (fc->getComponentAt (x - fc->getX(), | |||
| y - fc->getY()))) | |||
| if (PinComponent* pin = dynamic_cast<PinComponent*> (fc->getComponentAt (x - fc->getX(), | |||
| y - fc->getY()))) | |||
| return pin; | |||
| } | |||
| } | |||
| @@ -891,13 +891,13 @@ void GraphEditorPanel::updateComponents() | |||
| { | |||
| for (int i = getNumChildComponents(); --i >= 0;) | |||
| { | |||
| if (FilterComponent* const fc = dynamic_cast <FilterComponent*> (getChildComponent (i))) | |||
| if (FilterComponent* const fc = dynamic_cast<FilterComponent*> (getChildComponent (i))) | |||
| fc->update(); | |||
| } | |||
| for (int i = getNumChildComponents(); --i >= 0;) | |||
| { | |||
| ConnectorComponent* const cc = dynamic_cast <ConnectorComponent*> (getChildComponent (i)); | |||
| ConnectorComponent* const cc = dynamic_cast<ConnectorComponent*> (getChildComponent (i)); | |||
| if (cc != nullptr && cc != draggingConnector) | |||
| { | |||
| @@ -944,7 +944,7 @@ void GraphEditorPanel::beginConnectorDrag (const uint32 sourceFilterID, const in | |||
| const uint32 destFilterID, const int destFilterChannel, | |||
| const MouseEvent& e) | |||
| { | |||
| draggingConnector = dynamic_cast <ConnectorComponent*> (e.originalComponent); | |||
| draggingConnector = dynamic_cast<ConnectorComponent*> (e.originalComponent); | |||
| if (draggingConnector == nullptr) | |||
| draggingConnector = new ConnectorComponent (graph); | |||
| @@ -1063,7 +1063,7 @@ public: | |||
| void timerCallback() | |||
| { | |||
| Component* const underMouse = Desktop::getInstance().getMainMouseSource().getComponentUnderMouse(); | |||
| TooltipClient* const ttc = dynamic_cast <TooltipClient*> (underMouse); | |||
| TooltipClient* const ttc = dynamic_cast<TooltipClient*> (underMouse); | |||
| String newTip; | |||
| @@ -545,7 +545,7 @@ void MainHostWindow::filesDropped (const StringArray& files, int x, int y) | |||
| GraphDocumentComponent* MainHostWindow::getGraphEditor() const | |||
| { | |||
| return dynamic_cast <GraphDocumentComponent*> (getContentComponent()); | |||
| return dynamic_cast<GraphDocumentComponent*> (getContentComponent()); | |||
| } | |||
| bool MainHostWindow::isDoublePrecisionProcessing() | |||
| @@ -100,7 +100,7 @@ private: | |||
| KnownPluginList::SortMethod pluginSortMethod; | |||
| class PluginListWindow; | |||
| ScopedPointer <PluginListWindow> pluginListWindow; | |||
| ScopedPointer<PluginListWindow> pluginListWindow; | |||
| void showAudioSettings(); | |||
| @@ -76,7 +76,7 @@ public: | |||
| bool shouldDropFilesWhenDraggedExternally (const DragAndDropTarget::SourceDetails& sourceDetails, | |||
| StringArray& files, bool& canMoveFiles) override; | |||
| private: | |||
| ScopedPointer <Project> currentProject; | |||
| ScopedPointer<Project> currentProject; | |||
| static const char* getProjectWindowPosName() { return "projectWindowPos"; } | |||
| void createProjectContentCompIfNeeded(); | |||
| @@ -159,7 +159,7 @@ SourceCodeEditor::~SourceCodeEditor() | |||
| getAppSettings().appearance.settings.removeListener (this); | |||
| if (SourceCodeDocument* doc = dynamic_cast <SourceCodeDocument*> (getDocument())) | |||
| if (SourceCodeDocument* doc = dynamic_cast<SourceCodeDocument*> (getDocument())) | |||
| doc->updateLastState (*editor); | |||
| } | |||
| @@ -104,7 +104,7 @@ public: | |||
| MemoryBlock mb; | |||
| if (file.loadFileAsData (mb) | |||
| && seemsToBeText (static_cast <const char*> (mb.getData()), (int) mb.getSize()) | |||
| && seemsToBeText (static_cast<const char*> (mb.getData()), (int) mb.getSize()) | |||
| && ! file.hasFileExtension ("svg")) | |||
| return true; | |||
| @@ -38,7 +38,7 @@ public: | |||
| { | |||
| ComponentTypeHandler::getEditableProperties (component, document, props); | |||
| Button* const b = dynamic_cast <Button*> (component); | |||
| Button* const b = dynamic_cast<Button*> (component); | |||
| props.add (new ButtonTextProperty (b, document)); | |||
| @@ -54,7 +54,7 @@ public: | |||
| XmlElement* createXmlFor (Component* comp, const ComponentLayout* layout) | |||
| { | |||
| Button* const b = dynamic_cast <Button*> (comp); | |||
| Button* const b = dynamic_cast<Button*> (comp); | |||
| XmlElement* e = ComponentTypeHandler::createXmlFor (comp, layout); | |||
| e->setAttribute ("buttonText", b->getButtonText()); | |||
| @@ -67,7 +67,7 @@ public: | |||
| bool restoreFromXml (const XmlElement& xml, Component* comp, const ComponentLayout* layout) | |||
| { | |||
| Button* const b = dynamic_cast <Button*> (comp); | |||
| Button* const b = dynamic_cast<Button*> (comp); | |||
| if (! ComponentTypeHandler::restoreFromXml (xml, comp, layout)) | |||
| return false; | |||
| @@ -89,7 +89,7 @@ public: | |||
| { | |||
| ComponentTypeHandler::fillInCreationCode (code, component, memberVariableName); | |||
| Button* const b = dynamic_cast <Button*> (component); | |||
| Button* const b = dynamic_cast<Button*> (component); | |||
| if (b->getButtonText() != b->getName()) | |||
| { | |||
| @@ -36,7 +36,7 @@ public: | |||
| XmlElement* createXmlFor (Component* comp, const ComponentLayout* layout) | |||
| { | |||
| ComboBox* const c = dynamic_cast <ComboBox*> (comp); | |||
| ComboBox* const c = dynamic_cast<ComboBox*> (comp); | |||
| jassert (c != nullptr); | |||
| XmlElement* e = ComponentTypeHandler::createXmlFor (comp, layout); | |||
| @@ -57,7 +57,7 @@ public: | |||
| ComboBox defaultBox (String::empty); | |||
| ComboBox* const c = dynamic_cast <ComboBox*> (comp); | |||
| ComboBox* const c = dynamic_cast<ComboBox*> (comp); | |||
| jassert (c != nullptr); | |||
| c->setEditableText (xml.getBoolAttribute ("editable", defaultBox.isTextEditable())); | |||
| @@ -75,7 +75,7 @@ public: | |||
| { | |||
| ComponentTypeHandler::getEditableProperties (component, document, props); | |||
| ComboBox* const c = dynamic_cast <ComboBox*> (component); | |||
| ComboBox* const c = dynamic_cast<ComboBox*> (component); | |||
| jassert (c != nullptr); | |||
| props.add (new ComboItemsProperty (c, document)); | |||
| @@ -94,7 +94,7 @@ public: | |||
| { | |||
| ComponentTypeHandler::fillInCreationCode (code, component, memberVariableName); | |||
| ComboBox* const c = dynamic_cast <ComboBox*> (component); | |||
| ComboBox* const c = dynamic_cast<ComboBox*> (component); | |||
| jassert (c != nullptr); | |||
| String s; | |||
| @@ -100,10 +100,10 @@ JucerDocument* ComponentTypeHandler::findParentDocument (Component* component) | |||
| while (p != nullptr) | |||
| { | |||
| if (JucerDocumentEditor* const ed = dynamic_cast <JucerDocumentEditor*> (p)) | |||
| if (JucerDocumentEditor* const ed = dynamic_cast<JucerDocumentEditor*> (p)) | |||
| return ed->getDocument(); | |||
| if (TestComponent* const t = dynamic_cast <TestComponent*> (p)) | |||
| if (TestComponent* const t = dynamic_cast<TestComponent*> (p)) | |||
| return t->getDocument(); | |||
| p = p->getParentComponent(); | |||
| @@ -151,7 +151,7 @@ XmlElement* ComponentTypeHandler::createXmlFor (Component* comp, const Component | |||
| pos.updateFromComponent (*comp, layout); | |||
| pos.applyToXml (*e); | |||
| if (SettableTooltipClient* const ttc = dynamic_cast <SettableTooltipClient*> (comp)) | |||
| if (SettableTooltipClient* const ttc = dynamic_cast<SettableTooltipClient*> (comp)) | |||
| if (ttc->getTooltip().isNotEmpty()) | |||
| e->setAttribute ("tooltip", ttc->getTooltip()); | |||
| @@ -191,7 +191,7 @@ bool ComponentTypeHandler::restoreFromXml (const XmlElement& xml, | |||
| jassert (layout != 0); | |||
| setComponentPosition (comp, rpr, layout); | |||
| if (SettableTooltipClient* const ttc = dynamic_cast <SettableTooltipClient*> (comp)) | |||
| if (SettableTooltipClient* const ttc = dynamic_cast<SettableTooltipClient*> (comp)) | |||
| ttc->setTooltip (xml.getStringAttribute ("tooltip")); | |||
| for (int i = 0; i < colours.size(); ++i) | |||
| @@ -266,7 +266,7 @@ public: | |||
| String getText() const override | |||
| { | |||
| SettableTooltipClient* ttc = dynamic_cast <SettableTooltipClient*> (component); | |||
| SettableTooltipClient* ttc = dynamic_cast<SettableTooltipClient*> (component); | |||
| return ttc->getTooltip(); | |||
| } | |||
| @@ -284,7 +284,7 @@ private: | |||
| : ComponentUndoableAction<Component> (comp, l), | |||
| newValue (newValue_) | |||
| { | |||
| SettableTooltipClient* ttc = dynamic_cast <SettableTooltipClient*> (comp); | |||
| SettableTooltipClient* ttc = dynamic_cast<SettableTooltipClient*> (comp); | |||
| jassert (ttc != nullptr); | |||
| oldValue = ttc->getTooltip(); | |||
| } | |||
| @@ -293,7 +293,7 @@ private: | |||
| { | |||
| showCorrectTab(); | |||
| if (SettableTooltipClient* ttc = dynamic_cast <SettableTooltipClient*> (getComponent())) | |||
| if (SettableTooltipClient* ttc = dynamic_cast<SettableTooltipClient*> (getComponent())) | |||
| { | |||
| ttc->setTooltip (newValue); | |||
| changed(); | |||
| @@ -307,7 +307,7 @@ private: | |||
| { | |||
| showCorrectTab(); | |||
| if (SettableTooltipClient* ttc = dynamic_cast <SettableTooltipClient*> (getComponent())) | |||
| if (SettableTooltipClient* ttc = dynamic_cast<SettableTooltipClient*> (getComponent())) | |||
| { | |||
| ttc->setTooltip (oldValue); | |||
| changed(); | |||
| @@ -422,7 +422,7 @@ void ComponentTypeHandler::getEditableProperties (Component* component, | |||
| props.add (new ComponentPositionProperty (component, document, "width", ComponentPositionProperty::componentWidth)); | |||
| props.add (new ComponentPositionProperty (component, document, "height", ComponentPositionProperty::componentHeight)); | |||
| if (dynamic_cast <SettableTooltipClient*> (component) != nullptr) | |||
| if (dynamic_cast<SettableTooltipClient*> (component) != nullptr) | |||
| props.add (new TooltipProperty (component, document)); | |||
| props.add (new FocusOrderProperty (component, document)); | |||
| @@ -551,7 +551,7 @@ void ComponentTypeHandler::fillInCreationCode (GeneratedCode& code, Component* c | |||
| s << " (" << params << "));\n"; | |||
| } | |||
| if (SettableTooltipClient* ttc = dynamic_cast <SettableTooltipClient*> (component)) | |||
| if (SettableTooltipClient* ttc = dynamic_cast<SettableTooltipClient*> (component)) | |||
| { | |||
| if (ttc->getTooltip().isNotEmpty()) | |||
| { | |||
| @@ -44,7 +44,7 @@ public: | |||
| ComponentType* getComponent() const | |||
| { | |||
| ComponentType* const c = dynamic_cast <ComponentType*> (layout.getComponent (componentIndex)); | |||
| ComponentType* const c = dynamic_cast<ComponentType*> (layout.getComponent (componentIndex)); | |||
| jassert (c != nullptr); | |||
| return c; | |||
| } | |||
| @@ -67,7 +67,7 @@ protected: | |||
| ed->showLayout(); | |||
| if (layout.getSelectedSet().getNumSelected() == 0) | |||
| if (ComponentType* const c = dynamic_cast <ComponentType*> (layout.getComponent (componentIndex))) | |||
| if (ComponentType* const c = dynamic_cast<ComponentType*> (layout.getComponent (componentIndex))) | |||
| layout.getSelectedSet().selectOnly (getComponent()); | |||
| } | |||
| @@ -101,8 +101,8 @@ public: | |||
| { | |||
| ComponentTypeHandler::getEditableProperties (component, document, props); | |||
| props.add (new GenericCompClassProperty (dynamic_cast <GenericComponent*> (component), document)); | |||
| props.add (new GenericCompParamsProperty (dynamic_cast <GenericComponent*> (component), document)); | |||
| props.add (new GenericCompClassProperty (dynamic_cast<GenericComponent*> (component), document)); | |||
| props.add (new GenericCompParamsProperty (dynamic_cast<GenericComponent*> (component), document)); | |||
| } | |||
| String getClassName (Component* comp) const | |||
| @@ -78,7 +78,7 @@ public: | |||
| { | |||
| ComponentTypeHandler::fillInCreationCode (code, component, memberVariableName); | |||
| GroupComponent* const g = dynamic_cast <GroupComponent*> (component); | |||
| GroupComponent* const g = dynamic_cast<GroupComponent*> (component); | |||
| String s; | |||
| @@ -97,7 +97,7 @@ public: | |||
| return false; | |||
| ImageButton* const ib = (ImageButton*) comp; | |||
| ComponentLayout& l = const_cast <ComponentLayout&> (*layout); | |||
| ComponentLayout& l = const_cast<ComponentLayout&> (*layout); | |||
| setImageKeepProportions (l, ib, xml.getBoolAttribute ("keepProportions", true), false); | |||
| @@ -120,7 +120,7 @@ public: | |||
| { | |||
| ButtonHandler::fillInCreationCode (code, component, memberVariableName); | |||
| ImageButton* const ib = dynamic_cast <ImageButton*> (component); | |||
| ImageButton* const ib = dynamic_cast<ImageButton*> (component); | |||
| String s; | |||
| @@ -50,7 +50,7 @@ public: | |||
| XmlElement* createXmlFor (Component* comp, const ComponentLayout* layout) | |||
| { | |||
| TestComponent* const tc = dynamic_cast <TestComponent*> (comp); | |||
| TestComponent* const tc = dynamic_cast<TestComponent*> (comp); | |||
| XmlElement* e = ComponentTypeHandler::createXmlFor (comp, layout); | |||
| e->setAttribute ("sourceFile", tc->getFilename()); | |||
| @@ -61,7 +61,7 @@ public: | |||
| bool restoreFromXml (const XmlElement& xml, Component* comp, const ComponentLayout* layout) | |||
| { | |||
| TestComponent* const tc = dynamic_cast <TestComponent*> (comp); | |||
| TestComponent* const tc = dynamic_cast<TestComponent*> (comp); | |||
| if (! ComponentTypeHandler::restoreFromXml (xml, comp, layout)) | |||
| return false; | |||
| @@ -74,7 +74,7 @@ public: | |||
| String getClassName (Component* comp) const | |||
| { | |||
| TestComponent* const tc = dynamic_cast <TestComponent*> (comp); | |||
| TestComponent* const tc = dynamic_cast<TestComponent*> (comp); | |||
| String jucerCompClassName; | |||
| @@ -89,7 +89,7 @@ public: | |||
| void getEditableProperties (Component* component, JucerDocument& document, Array<PropertyComponent*>& props) | |||
| { | |||
| TestComponent* const tc = dynamic_cast <TestComponent*> (component); | |||
| TestComponent* const tc = dynamic_cast<TestComponent*> (component); | |||
| ComponentTypeHandler::getEditableProperties (component, document, props); | |||
| @@ -107,7 +107,7 @@ public: | |||
| { | |||
| ComponentTypeHandler::fillInCreationCode (code, component, memberVariableName); | |||
| TestComponent* const tc = dynamic_cast <TestComponent*> (component); | |||
| TestComponent* const tc = dynamic_cast<TestComponent*> (component); | |||
| code.includeFilesH.add (tc->getFilename().replace (".cpp", ".h")); | |||
| } | |||
| @@ -43,7 +43,7 @@ public: | |||
| XmlElement* createXmlFor (Component* comp, const ComponentLayout* layout) | |||
| { | |||
| Label* const l = dynamic_cast <Label*> (comp); | |||
| Label* const l = dynamic_cast<Label*> (comp); | |||
| XmlElement* e = ComponentTypeHandler::createXmlFor (comp, layout); | |||
| e->setAttribute ("labelText", l->getText()); | |||
| @@ -63,7 +63,7 @@ public: | |||
| bool restoreFromXml (const XmlElement& xml, Component* comp, const ComponentLayout* layout) | |||
| { | |||
| Label* const l = dynamic_cast <Label*> (comp); | |||
| Label* const l = dynamic_cast<Label*> (comp); | |||
| if (! ComponentTypeHandler::restoreFromXml (xml, comp, layout)) | |||
| return false; | |||
| @@ -99,7 +99,7 @@ public: | |||
| String getCreationParameters (GeneratedCode& code, Component* component) | |||
| { | |||
| Label* const l = dynamic_cast <Label*> (component); | |||
| Label* const l = dynamic_cast<Label*> (component); | |||
| return quotedString (component->getName(), false) | |||
| + ",\n" | |||
| @@ -110,7 +110,7 @@ public: | |||
| { | |||
| ComponentTypeHandler::fillInCreationCode (code, component, memberVariableName); | |||
| Label* const l = dynamic_cast <Label*> (component); | |||
| Label* const l = dynamic_cast<Label*> (component); | |||
| String s; | |||
| @@ -161,7 +161,7 @@ public: | |||
| { | |||
| ComponentTypeHandler::getEditableProperties (component, document, props); | |||
| Label* const l = dynamic_cast <Label*> (component); | |||
| Label* const l = dynamic_cast<Label*> (component); | |||
| props.add (new LabelTextProperty (l, document)); | |||
| props.add (new LabelJustificationProperty (l, document)); | |||
| @@ -48,7 +48,7 @@ public: | |||
| { | |||
| XmlElement* e = ComponentTypeHandler::createXmlFor (comp, layout); | |||
| Slider* const s = dynamic_cast <Slider*> (comp); | |||
| Slider* const s = dynamic_cast<Slider*> (comp); | |||
| e->setAttribute ("min", s->getMinimum()); | |||
| e->setAttribute ("max", s->getMaximum()); | |||
| e->setAttribute ("int", s->getInterval()); | |||
| @@ -67,7 +67,7 @@ public: | |||
| if (! ComponentTypeHandler::restoreFromXml (xml, comp, layout)) | |||
| return false; | |||
| Slider* const s = dynamic_cast <Slider*> (comp); | |||
| Slider* const s = dynamic_cast<Slider*> (comp); | |||
| s->setRange (xml.getDoubleAttribute ("min", 0.0), | |||
| xml.getDoubleAttribute ("max", 10.0), | |||
| @@ -94,7 +94,7 @@ public: | |||
| { | |||
| ComponentTypeHandler::fillInCreationCode (code, component, memberVariableName); | |||
| Slider* const s = dynamic_cast <Slider*> (component); | |||
| Slider* const s = dynamic_cast<Slider*> (component); | |||
| String r; | |||
| r << memberVariableName << "->setRange (" | |||
| @@ -145,7 +145,7 @@ public: | |||
| { | |||
| ComponentTypeHandler::getEditableProperties (component, document, props); | |||
| Slider* s = dynamic_cast <Slider*> (component); | |||
| Slider* s = dynamic_cast<Slider*> (component); | |||
| jassert (s != 0); | |||
| props.add (new SliderRangeProperty (s, document, "minimum", 0)); | |||
| @@ -226,7 +226,7 @@ private: | |||
| Slider::ThreeValueVertical }; | |||
| for (int i = 0; i < numElementsInArray (types); ++i) | |||
| if (types [i] == dynamic_cast <Slider*> (component)->getSliderStyle()) | |||
| if (types [i] == dynamic_cast<Slider*> (component)->getSliderStyle()) | |||
| return i; | |||
| return -1; | |||
| @@ -502,7 +502,7 @@ private: | |||
| String getText() const override | |||
| { | |||
| Slider* s = dynamic_cast <Slider*> (component); | |||
| Slider* s = dynamic_cast<Slider*> (component); | |||
| jassert (s != nullptr); | |||
| switch (rangeParam) | |||
| @@ -573,7 +573,7 @@ private: | |||
| String getText() const override | |||
| { | |||
| Slider* s = dynamic_cast <Slider*> (component); | |||
| Slider* s = dynamic_cast<Slider*> (component); | |||
| jassert (s != 0); | |||
| return String (s->getSkewFactor()); | |||
| @@ -69,7 +69,7 @@ public: | |||
| { | |||
| ButtonHandler::fillInCreationCode (code, component, memberVariableName); | |||
| //TextButton* const tb = dynamic_cast <TextButton*> (component); | |||
| //TextButton* const tb = dynamic_cast<TextButton*> (component); | |||
| //TextButton defaultButton (String::empty); | |||
| String s; | |||
| @@ -83,7 +83,7 @@ public: | |||
| { | |||
| ComponentTypeHandler::getEditableProperties (component, document, props); | |||
| TextEditor* const t = dynamic_cast <TextEditor*> (component); | |||
| TextEditor* const t = dynamic_cast<TextEditor*> (component); | |||
| jassert (t != nullptr); | |||
| props.add (new TextEditorInitialTextProperty (t, document)); | |||
| @@ -105,7 +105,7 @@ public: | |||
| { | |||
| ComponentTypeHandler::fillInCreationCode (code, component, memberVariableName); | |||
| TextEditor* const te = dynamic_cast <TextEditor*> (component); | |||
| TextEditor* const te = dynamic_cast<TextEditor*> (component); | |||
| jassert (te != 0); | |||
| String s; | |||
| @@ -70,7 +70,7 @@ public: | |||
| { | |||
| ButtonHandler::fillInCreationCode (code, component, memberVariableName); | |||
| ToggleButton* const tb = dynamic_cast <ToggleButton*> (component); | |||
| ToggleButton* const tb = dynamic_cast<ToggleButton*> (component); | |||
| String s; | |||
| @@ -39,7 +39,7 @@ public: | |||
| XmlElement* createXmlFor (Component* comp, const ComponentLayout* layout) | |||
| { | |||
| TreeView* const t = dynamic_cast <TreeView*> (comp); | |||
| TreeView* const t = dynamic_cast<TreeView*> (comp); | |||
| XmlElement* const e = ComponentTypeHandler::createXmlFor (comp, layout); | |||
| e->setAttribute ("rootVisible", t->isRootItemVisible()); | |||
| @@ -54,7 +54,7 @@ public: | |||
| return false; | |||
| TreeView defaultTreeView; | |||
| TreeView* const t = dynamic_cast <TreeView*> (comp); | |||
| TreeView* const t = dynamic_cast<TreeView*> (comp); | |||
| t->setRootItemVisible (xml.getBoolAttribute ("rootVisible", defaultTreeView.isRootItemVisible())); | |||
| t->setDefaultOpenness (xml.getBoolAttribute ("openByDefault", defaultTreeView.areItemsOpenByDefault())); | |||
| @@ -65,7 +65,7 @@ public: | |||
| void getEditableProperties (Component* component, JucerDocument& document, Array<PropertyComponent*>& props) | |||
| { | |||
| ComponentTypeHandler::getEditableProperties (component, document, props); | |||
| TreeView* const t = dynamic_cast <TreeView*> (component); | |||
| TreeView* const t = dynamic_cast<TreeView*> (component); | |||
| props.add (new TreeViewRootItemProperty (t, document)); | |||
| props.add (new TreeViewRootOpennessProperty (t, document)); | |||
| @@ -81,7 +81,7 @@ public: | |||
| void fillInCreationCode (GeneratedCode& code, Component* component, const String& memberVariableName) | |||
| { | |||
| TreeView defaultTreeView; | |||
| TreeView* const t = dynamic_cast <TreeView*> (component); | |||
| TreeView* const t = dynamic_cast<TreeView*> (component); | |||
| ComponentTypeHandler::fillInCreationCode (code, component, memberVariableName); | |||
| @@ -39,7 +39,7 @@ public: | |||
| XmlElement* createXmlFor (Component* comp, const ComponentLayout* layout) | |||
| { | |||
| Viewport* const v = dynamic_cast <Viewport*> (comp); | |||
| Viewport* const v = dynamic_cast<Viewport*> (comp); | |||
| XmlElement* const e = ComponentTypeHandler::createXmlFor (comp, layout); | |||
| e->setAttribute ("vscroll", v->isVerticalScrollBarShown()); | |||
| @@ -60,7 +60,7 @@ public: | |||
| return false; | |||
| Viewport defaultViewport; | |||
| Viewport* const v = dynamic_cast <Viewport*> (comp); | |||
| Viewport* const v = dynamic_cast<Viewport*> (comp); | |||
| v->setScrollBarsShown (xml.getBoolAttribute ("vscroll", defaultViewport.isVerticalScrollBarShown()), | |||
| xml.getBoolAttribute ("hscroll", defaultViewport.isHorizontalScrollBarShown())); | |||
| @@ -78,7 +78,7 @@ public: | |||
| { | |||
| ComponentTypeHandler::getEditableProperties (component, document, props); | |||
| Viewport* const v = dynamic_cast <Viewport*> (component); | |||
| Viewport* const v = dynamic_cast<Viewport*> (component); | |||
| props.add (new ViewportScrollbarShownProperty (v, document, true)); | |||
| props.add (new ViewportScrollbarShownProperty (v, document, false)); | |||
| @@ -105,7 +105,7 @@ public: | |||
| void fillInCreationCode (GeneratedCode& code, Component* component, const String& memberVariableName) | |||
| { | |||
| Viewport defaultViewport; | |||
| Viewport* const v = dynamic_cast <Viewport*> (component); | |||
| Viewport* const v = dynamic_cast<Viewport*> (component); | |||
| ComponentTypeHandler::fillInCreationCode (code, component, memberVariableName); | |||
| @@ -187,7 +187,7 @@ void BinaryResources::remove (const int i) | |||
| const Drawable* BinaryResources::getDrawable (const String& name) const | |||
| { | |||
| if (BinaryResources::BinaryResource* const res = const_cast <BinaryResources::BinaryResource*> (getResource (name))) | |||
| if (BinaryResources::BinaryResource* const res = const_cast<BinaryResources::BinaryResource*> (getResource (name))) | |||
| { | |||
| if (res->drawable == nullptr && res->data.getSize() > 0) | |||
| res->drawable = Drawable::createFromImageData (res->data.getData(), | |||
| @@ -418,7 +418,7 @@ Component* ComponentLayout::getComponentRelativePosTarget (Component* comp, int | |||
| { | |||
| jassert (comp != nullptr); | |||
| if (PaintElement* const pe = dynamic_cast <PaintElement*> (comp)) | |||
| if (PaintElement* const pe = dynamic_cast<PaintElement*> (comp)) | |||
| { | |||
| int64 compId; | |||
| @@ -436,7 +436,7 @@ Component* ComponentLayout::getComponentRelativePosTarget (Component* comp, int | |||
| void ComponentLayout::setComponentRelativeTarget (Component* comp, int whichDimension, Component* compToBeRelativeTo) | |||
| { | |||
| PaintElement* const pe = dynamic_cast <PaintElement*> (comp); | |||
| PaintElement* const pe = dynamic_cast<PaintElement*> (comp); | |||
| jassert (comp != nullptr); | |||
| jassert (pe != nullptr || components.contains (comp)); | |||
| @@ -453,7 +453,7 @@ void ComponentLayout::setComponentRelativeTarget (Component* comp, int whichDime | |||
| if (pe != nullptr) | |||
| { | |||
| oldBounds = pe->getCurrentBounds (dynamic_cast <PaintRoutineEditor*> (pe->getParentComponent())->getComponentArea()); | |||
| oldBounds = pe->getCurrentBounds (dynamic_cast<PaintRoutineEditor*> (pe->getParentComponent())->getComponentArea()); | |||
| pos = pe->getPosition(); | |||
| } | |||
| else | |||
| @@ -469,7 +469,7 @@ void ComponentLayout::setComponentRelativeTarget (Component* comp, int whichDime | |||
| if (pe != nullptr) | |||
| { | |||
| pe->setPosition (pos, true); | |||
| pe->setCurrentBounds (oldBounds, dynamic_cast <PaintRoutineEditor*> (pe->getParentComponent())->getComponentArea(), true); | |||
| pe->setCurrentBounds (oldBounds, dynamic_cast<PaintRoutineEditor*> (pe->getParentComponent())->getComponentArea(), true); | |||
| } | |||
| else | |||
| { | |||
| @@ -555,7 +555,7 @@ bool JucerDocument::flushChangesToDocuments() | |||
| OpenDocumentManager& odm = IntrojucerApp::getApp().openDocumentManager; | |||
| if (SourceCodeDocument* header = dynamic_cast <SourceCodeDocument*> (odm.openFile (nullptr, getHeaderFile()))) | |||
| if (SourceCodeDocument* header = dynamic_cast<SourceCodeDocument*> (odm.openFile (nullptr, getHeaderFile()))) | |||
| { | |||
| String existingHeader (header->getCodeDocument().getAllContent()); | |||
| String existingCpp (cpp->getCodeDocument().getAllContent()); | |||
| @@ -733,9 +733,9 @@ public: | |||
| OpenDocumentManager& odm = IntrojucerApp::getApp().openDocumentManager; | |||
| if (SourceCodeDocument* cpp = dynamic_cast <SourceCodeDocument*> (odm.openFile (nullptr, cppFile))) | |||
| if (SourceCodeDocument* cpp = dynamic_cast<SourceCodeDocument*> (odm.openFile (nullptr, cppFile))) | |||
| { | |||
| if (SourceCodeDocument* header = dynamic_cast <SourceCodeDocument*> (odm.openFile (nullptr, headerFile))) | |||
| if (SourceCodeDocument* header = dynamic_cast<SourceCodeDocument*> (odm.openFile (nullptr, headerFile))) | |||
| { | |||
| ScopedPointer<JucerDocument> jucerDoc (new ComponentDocument (cpp)); | |||
| @@ -505,7 +505,7 @@ void PaintRoutine::dropImageAt (const File& f, int x, int y) | |||
| PaintElement* newElement | |||
| = addNewElement (ObjectTypes::createNewImageElement (this), -1, true); | |||
| if (PaintElementImage* pei = dynamic_cast <PaintElementImage*> (newElement)) | |||
| if (PaintElementImage* pei = dynamic_cast<PaintElementImage*> (newElement)) | |||
| { | |||
| String resourceName (getDocument()->getResources().findUniqueName (f.getFileName())); | |||
| @@ -44,7 +44,7 @@ public: | |||
| RelativePositionedRectangle getPosition() | |||
| { | |||
| ColouredElement* e = dynamic_cast <ColouredElement*> (owner); | |||
| ColouredElement* e = dynamic_cast<ColouredElement*> (owner); | |||
| if (isStroke) | |||
| return isStart ? e->getStrokeType().fill.gradPos1 | |||
| @@ -56,7 +56,7 @@ public: | |||
| void setPosition (const RelativePositionedRectangle& newPos) | |||
| { | |||
| ColouredElement* e = dynamic_cast <ColouredElement*> (owner); | |||
| ColouredElement* e = dynamic_cast<ColouredElement*> (owner); | |||
| if (isStroke) | |||
| { | |||
| @@ -86,7 +86,7 @@ public: | |||
| { | |||
| PointComponent::updatePosition(); | |||
| ColouredElement* e = dynamic_cast <ColouredElement*> (owner); | |||
| ColouredElement* e = dynamic_cast<ColouredElement*> (owner); | |||
| JucerFillType f (isStroke ? e->getStrokeType().fill | |||
| : e->getFillType()); | |||
| @@ -291,7 +291,7 @@ void PaintElement::mouseDrag (const MouseEvent& e) | |||
| { | |||
| if (! e.mods.isPopupMenu()) | |||
| { | |||
| jassert (dynamic_cast <PaintRoutineEditor*> (getParentComponent()) != nullptr); | |||
| jassert (dynamic_cast<PaintRoutineEditor*> (getParentComponent()) != nullptr); | |||
| const Rectangle<int> area (((PaintRoutineEditor*) getParentComponent())->getComponentArea()); | |||
| if (selected && ! dragging) | |||
| @@ -392,7 +392,7 @@ void PaintElement::applyBoundsToComponent (Component*, const Rectangle<int>& new | |||
| { | |||
| getDocument()->getUndoManager().undoCurrentTransactionOnly(); | |||
| jassert (dynamic_cast <PaintRoutineEditor*> (getParentComponent()) != nullptr); | |||
| jassert (dynamic_cast<PaintRoutineEditor*> (getParentComponent()) != nullptr); | |||
| setCurrentBounds (newBounds.expanded (-borderThickness, -borderThickness), | |||
| ((PaintRoutineEditor*) getParentComponent())->getComponentArea(), | |||
| @@ -402,7 +402,7 @@ void PaintElement::applyBoundsToComponent (Component*, const Rectangle<int>& new | |||
| Rectangle<int> PaintElement::getCurrentAbsoluteBounds() const | |||
| { | |||
| jassert (dynamic_cast <PaintRoutineEditor*> (getParentComponent()) != nullptr); | |||
| jassert (dynamic_cast<PaintRoutineEditor*> (getParentComponent()) != nullptr); | |||
| const Rectangle<int> area (((PaintRoutineEditor*) getParentComponent())->getComponentArea()); | |||
| return position.getRectangle (area, getDocument()->getComponentLayout()); | |||
| @@ -410,7 +410,7 @@ Rectangle<int> PaintElement::getCurrentAbsoluteBounds() const | |||
| void PaintElement::getCurrentAbsoluteBoundsDouble (double& x, double& y, double& w, double& h) const | |||
| { | |||
| jassert (dynamic_cast <PaintRoutineEditor*> (getParentComponent()) != nullptr); | |||
| jassert (dynamic_cast<PaintRoutineEditor*> (getParentComponent()) != nullptr); | |||
| const Rectangle<int> area (((PaintRoutineEditor*) getParentComponent())->getComponentArea()); | |||
| position.getRectangleDouble (x, y, w, h, area, getDocument()->getComponentLayout()); | |||
| @@ -97,7 +97,7 @@ public: | |||
| return true; | |||
| for (int i = subElements.size(); --i >= 0;) | |||
| if (PaintElementGroup* pg = dynamic_cast <PaintElementGroup*> (subElements.getUnchecked(i))) | |||
| if (PaintElementGroup* pg = dynamic_cast<PaintElementGroup*> (subElements.getUnchecked(i))) | |||
| if (pg->containsElement (element)) | |||
| return true; | |||
| @@ -98,7 +98,7 @@ public: | |||
| if (opacity > 0) | |||
| { | |||
| if (dynamic_cast <const DrawableImage*> (getDrawable()) != 0) | |||
| if (dynamic_cast<const DrawableImage*> (getDrawable()) != 0) | |||
| { | |||
| const String imageVariable ("cachedImage_" + resourceName.replace ("::", "_") + "_" + String (code.getUniqueSuffix())); | |||
| @@ -288,7 +288,7 @@ public: | |||
| { | |||
| if (const Drawable* const image = getDrawable()) | |||
| { | |||
| if (PaintRoutineEditor* ed = dynamic_cast <PaintRoutineEditor*> (getParentComponent())) | |||
| if (PaintRoutineEditor* ed = dynamic_cast<PaintRoutineEditor*> (getParentComponent())) | |||
| { | |||
| const Rectangle<int> parentArea (ed->getComponentArea()); | |||
| @@ -51,26 +51,26 @@ public: | |||
| if (containerGroups.size() > 0) | |||
| { | |||
| PaintElementGroup* group = 0; | |||
| group = dynamic_cast <PaintElementGroup*> (routine.getElement (containerGroups.getFirst())); | |||
| group = dynamic_cast<PaintElementGroup*> (routine.getElement (containerGroups.getFirst())); | |||
| if (group == 0) | |||
| return 0; | |||
| for (int i = 1; i < containerGroups.size(); ++i) | |||
| { | |||
| group = dynamic_cast <PaintElementGroup*> (group->getElement (containerGroups.getUnchecked(i))); | |||
| group = dynamic_cast<PaintElementGroup*> (group->getElement (containerGroups.getUnchecked(i))); | |||
| if (group == 0) | |||
| return 0; | |||
| } | |||
| ElementType* const e = dynamic_cast <ElementType*> (group->getElement (elementIndex)); | |||
| ElementType* const e = dynamic_cast<ElementType*> (group->getElement (elementIndex)); | |||
| jassert (e != 0); | |||
| return e; | |||
| } | |||
| else | |||
| { | |||
| ElementType* const e = dynamic_cast <ElementType*> (routine.getElement (elementIndex)); | |||
| ElementType* const e = dynamic_cast<ElementType*> (routine.getElement (elementIndex)); | |||
| jassert (e != 0); | |||
| return e; | |||
| } | |||
| @@ -95,7 +95,7 @@ protected: | |||
| docHolder->showGraphics (&routine); | |||
| if (routine.getSelectedElements().getNumSelected() == 0) | |||
| if (ElementType* const e = dynamic_cast <ElementType*> (routine.getElement (elementIndex))) | |||
| if (ElementType* const e = dynamic_cast<ElementType*> (routine.getElement (elementIndex))) | |||
| routine.getSelectedElements().selectOnly (e); | |||
| } | |||
| @@ -104,7 +104,7 @@ private: | |||
| { | |||
| for (int i = pr->getNumElements(); --i >= 0;) | |||
| { | |||
| PaintElementGroup* const pg = dynamic_cast <PaintElementGroup*> (pr->getElement (i)); | |||
| PaintElementGroup* const pg = dynamic_cast<PaintElementGroup*> (pr->getElement (i)); | |||
| if (pg != 0 && pg->containsElement (element)) | |||
| { | |||
| @@ -122,7 +122,7 @@ private: | |||
| { | |||
| for (int i = group->getNumElements(); --i >= 0;) | |||
| { | |||
| PaintElementGroup* pg = dynamic_cast <PaintElementGroup*> (group->getElement (i)); | |||
| PaintElementGroup* pg = dynamic_cast<PaintElementGroup*> (group->getElement (i)); | |||
| if (pg != 0 && pg->containsElement (element)) | |||
| { | |||
| @@ -43,9 +43,9 @@ public: | |||
| virtual RelativePositionedRectangle getPosition() = 0; | |||
| virtual void setPosition (const RelativePositionedRectangle& newPos) = 0; | |||
| virtual void updatePosition() | |||
| void updatePosition() override | |||
| { | |||
| if (dynamic_cast <PaintRoutineEditor*> (getParentComponent()) != 0) | |||
| if (dynamic_cast<PaintRoutineEditor*> (getParentComponent()) != nullptr) | |||
| { | |||
| const Rectangle<int> area (((PaintRoutineEditor*) getParentComponent())->getComponentArea()); | |||
| const Rectangle<int> r (getPosition().getRectangle (area, owner->getDocument()->getComponentLayout())); | |||
| @@ -55,7 +55,7 @@ public: | |||
| } | |||
| //============================================================================== | |||
| void paint (Graphics& g) | |||
| void paint (Graphics& g) override | |||
| { | |||
| g.setColour (Colours::white); | |||
| g.drawEllipse (2.0f, 2.0f, getWidth() - 4.0f, getHeight() - 4.0f, 2.0f); | |||
| @@ -65,14 +65,14 @@ public: | |||
| } | |||
| //============================================================================== | |||
| void mouseDown (const MouseEvent&) | |||
| void mouseDown (const MouseEvent&) override | |||
| { | |||
| const Rectangle<int> area (((PaintRoutineEditor*) getParentComponent())->getComponentArea()); | |||
| dragX = getX() + getWidth() / 2 - area.getX(); | |||
| dragY = getY() + getHeight() / 2 - area.getY(); | |||
| } | |||
| void mouseDrag (const MouseEvent& e) | |||
| void mouseDrag (const MouseEvent& e) override | |||
| { | |||
| const Rectangle<int> area (((PaintRoutineEditor*) getParentComponent())->getComponentArea()); | |||
| int x = dragX + e.getDistanceFromDragStartX(); | |||
| @@ -99,7 +99,7 @@ public: | |||
| } | |||
| } | |||
| void mouseUp (const MouseEvent&) | |||
| void mouseUp (const MouseEvent&) override | |||
| { | |||
| } | |||
| @@ -156,7 +156,7 @@ private: | |||
| else | |||
| getComponent()->removeColour (colourId); | |||
| if (TextEditor* const te = dynamic_cast <TextEditor*> (getComponent())) | |||
| if (TextEditor* const te = dynamic_cast<TextEditor*> (getComponent())) | |||
| te->applyFontToAllText (te->getFont()); | |||
| changed(); | |||
| @@ -340,8 +340,8 @@ public: | |||
| if (component->findParentComponentOfClass<ComponentLayoutEditor>() != 0) | |||
| parentArea.setSize (component->getParentWidth(), component->getParentHeight()); | |||
| else if (dynamic_cast <PaintRoutineEditor*> (component->getParentComponent()) != 0) | |||
| parentArea = dynamic_cast <PaintRoutineEditor*> (component->getParentComponent())->getComponentArea(); | |||
| else if (PaintRoutineEditor* pre = dynamic_cast<PaintRoutineEditor*> (component->getParentComponent())) | |||
| parentArea = pre->getComponentArea(); | |||
| else | |||
| jassertfalse; | |||
| @@ -188,7 +188,7 @@ Image ComponentLayoutEditor::createComponentLayerSnapshot() const | |||
| void ComponentLayoutEditor::updateOverlayPositions() | |||
| { | |||
| for (int i = getNumChildComponents(); --i >= 0;) | |||
| if (ComponentOverlayComponent* const overlay = dynamic_cast <ComponentOverlayComponent*> (getChildComponent (i))) | |||
| if (ComponentOverlayComponent* const overlay = dynamic_cast<ComponentOverlayComponent*> (getChildComponent (i))) | |||
| overlay->updateBoundsToMatchTarget(); | |||
| } | |||
| @@ -196,7 +196,7 @@ void ComponentLayoutEditor::refreshAllComponents() | |||
| { | |||
| for (int i = getNumChildComponents(); --i >= 0;) | |||
| { | |||
| ScopedPointer<ComponentOverlayComponent> overlay (dynamic_cast <ComponentOverlayComponent*> (getChildComponent (i))); | |||
| ScopedPointer<ComponentOverlayComponent> overlay (dynamic_cast<ComponentOverlayComponent*> (getChildComponent (i))); | |||
| if (overlay != nullptr && layout.containsComponent (overlay->target)) | |||
| overlay.release(); | |||
| @@ -399,7 +399,7 @@ ComponentOverlayComponent* ComponentLayoutEditor::getOverlayCompFor (Component* | |||
| { | |||
| for (int i = getNumChildComponents(); --i >= 0;) | |||
| { | |||
| if (ComponentOverlayComponent* const overlay = dynamic_cast <ComponentOverlayComponent*> (getChildComponent (i))) | |||
| if (ComponentOverlayComponent* const overlay = dynamic_cast<ComponentOverlayComponent*> (getChildComponent (i))) | |||
| if (overlay->target == compToFind) | |||
| return overlay; | |||
| } | |||
| @@ -93,7 +93,7 @@ public: | |||
| else | |||
| { | |||
| for (int i = getNumChildComponents(); --i >= 0;) | |||
| ScopedPointer<DraggerOverlayComp> deleter (dynamic_cast <DraggerOverlayComp*> (getChildComponent (i))); | |||
| ScopedPointer<DraggerOverlayComp> deleter (dynamic_cast<DraggerOverlayComp*> (getChildComponent (i))); | |||
| } | |||
| } | |||
| } | |||
| @@ -183,7 +183,7 @@ void EditingPanelBase::visibilityChanged() | |||
| { | |||
| resized(); | |||
| if (JucerDocumentEditor* const cdh = dynamic_cast <JucerDocumentEditor*> (p->getParentComponent())) | |||
| if (JucerDocumentEditor* const cdh = dynamic_cast<JucerDocumentEditor*> (p->getParentComponent())) | |||
| cdh->setViewportToLastPos (viewport, *this); | |||
| resized(); | |||
| @@ -192,7 +192,7 @@ void EditingPanelBase::visibilityChanged() | |||
| else | |||
| { | |||
| if (Component* p = getParentComponent()) | |||
| if (JucerDocumentEditor* const cdh = dynamic_cast <JucerDocumentEditor*> (p->getParentComponent())) | |||
| if (JucerDocumentEditor* const cdh = dynamic_cast<JucerDocumentEditor*> (p->getParentComponent())) | |||
| cdh->storeLastViewportPos (viewport, *this); | |||
| } | |||
| @@ -360,14 +360,14 @@ void JucerDocumentEditor::refreshPropertiesPanel() const | |||
| { | |||
| for (int i = tabbedComponent.getNumTabs(); --i >= 0;) | |||
| { | |||
| if (ComponentLayoutPanel* layoutPanel = dynamic_cast <ComponentLayoutPanel*> (tabbedComponent.getTabContentComponent (i))) | |||
| if (ComponentLayoutPanel* layoutPanel = dynamic_cast<ComponentLayoutPanel*> (tabbedComponent.getTabContentComponent (i))) | |||
| { | |||
| if (layoutPanel->isVisible()) | |||
| layoutPanel->updatePropertiesList(); | |||
| } | |||
| else | |||
| { | |||
| if (PaintRoutinePanel* pr = dynamic_cast <PaintRoutinePanel*> (tabbedComponent.getTabContentComponent (i))) | |||
| if (PaintRoutinePanel* pr = dynamic_cast<PaintRoutinePanel*> (tabbedComponent.getTabContentComponent (i))) | |||
| if (pr->isVisible()) | |||
| pr->updatePropertiesList(); | |||
| } | |||
| @@ -380,7 +380,7 @@ void JucerDocumentEditor::updateTabs() | |||
| for (int i = tabbedComponent.getNumTabs(); --i >= 0;) | |||
| { | |||
| if (dynamic_cast <PaintRoutinePanel*> (tabbedComponent.getTabContentComponent (i)) != 0 | |||
| if (dynamic_cast<PaintRoutinePanel*> (tabbedComponent.getTabContentComponent (i)) != 0 | |||
| && ! paintRoutineNames.contains (tabbedComponent.getTabNames() [i])) | |||
| { | |||
| tabbedComponent.removeTab (i); | |||
| @@ -394,7 +394,7 @@ void JucerDocumentEditor::updateTabs() | |||
| int index, numPaintRoutinesSeen = 0; | |||
| for (index = 1; index < tabbedComponent.getNumTabs(); ++index) | |||
| { | |||
| if (dynamic_cast <PaintRoutinePanel*> (tabbedComponent.getTabContentComponent (index)) != nullptr) | |||
| if (dynamic_cast<PaintRoutinePanel*> (tabbedComponent.getTabContentComponent (index)) != nullptr) | |||
| { | |||
| if (++numPaintRoutinesSeen == i) | |||
| { | |||
| @@ -440,7 +440,7 @@ ApplicationCommandTarget* JucerDocumentEditor::getNextCommandTarget() | |||
| ComponentLayout* JucerDocumentEditor::getCurrentLayout() const | |||
| { | |||
| if (ComponentLayoutPanel* panel = dynamic_cast <ComponentLayoutPanel*> (tabbedComponent.getCurrentContentComponent())) | |||
| if (ComponentLayoutPanel* panel = dynamic_cast<ComponentLayoutPanel*> (tabbedComponent.getCurrentContentComponent())) | |||
| return &(panel->layout); | |||
| return nullptr; | |||
| @@ -448,7 +448,7 @@ ComponentLayout* JucerDocumentEditor::getCurrentLayout() const | |||
| PaintRoutine* JucerDocumentEditor::getCurrentPaintRoutine() const | |||
| { | |||
| if (PaintRoutinePanel* panel = dynamic_cast <PaintRoutinePanel*> (tabbedComponent.getCurrentContentComponent())) | |||
| if (PaintRoutinePanel* panel = dynamic_cast<PaintRoutinePanel*> (tabbedComponent.getCurrentContentComponent())) | |||
| return &(panel->getPaintRoutine()); | |||
| return nullptr; | |||
| @@ -460,7 +460,7 @@ void JucerDocumentEditor::showLayout() | |||
| { | |||
| for (int i = 0; i < tabbedComponent.getNumTabs(); ++i) | |||
| { | |||
| if (dynamic_cast <ComponentLayoutPanel*> (tabbedComponent.getTabContentComponent (i)) != nullptr) | |||
| if (dynamic_cast<ComponentLayoutPanel*> (tabbedComponent.getTabContentComponent (i)) != nullptr) | |||
| { | |||
| tabbedComponent.setCurrentTabIndex (i); | |||
| break; | |||
| @@ -475,7 +475,7 @@ void JucerDocumentEditor::showGraphics (PaintRoutine* routine) | |||
| { | |||
| for (int i = 0; i < tabbedComponent.getNumTabs(); ++i) | |||
| { | |||
| if (PaintRoutinePanel* pr = dynamic_cast <PaintRoutinePanel*> (tabbedComponent.getTabContentComponent (i))) | |||
| if (PaintRoutinePanel* pr = dynamic_cast<PaintRoutinePanel*> (tabbedComponent.getTabContentComponent (i))) | |||
| { | |||
| if (routine == &(pr->getPaintRoutine()) || routine == nullptr) | |||
| { | |||
| @@ -506,13 +506,13 @@ void JucerDocumentEditor::setZoom (double scale) | |||
| { | |||
| scale = jlimit (1.0 / 4.0, 32.0, scale); | |||
| if (EditingPanelBase* panel = dynamic_cast <EditingPanelBase*> (tabbedComponent.getCurrentContentComponent())) | |||
| if (EditingPanelBase* panel = dynamic_cast<EditingPanelBase*> (tabbedComponent.getCurrentContentComponent())) | |||
| panel->setZoom (scale); | |||
| } | |||
| double JucerDocumentEditor::getZoom() const | |||
| { | |||
| if (EditingPanelBase* panel = dynamic_cast <EditingPanelBase*> (tabbedComponent.getCurrentContentComponent())) | |||
| if (EditingPanelBase* panel = dynamic_cast<EditingPanelBase*> (tabbedComponent.getCurrentContentComponent())) | |||
| return panel->getZoom(); | |||
| return 1.0; | |||
| @@ -528,7 +528,7 @@ static double snapToIntegerZoom (double zoom) | |||
| void JucerDocumentEditor::addElement (const int index) | |||
| { | |||
| if (PaintRoutinePanel* const panel = dynamic_cast <PaintRoutinePanel*> (tabbedComponent.getCurrentContentComponent())) | |||
| if (PaintRoutinePanel* const panel = dynamic_cast<PaintRoutinePanel*> (tabbedComponent.getCurrentContentComponent())) | |||
| { | |||
| PaintRoutine* const currentPaintRoutine = & (panel->getPaintRoutine()); | |||
| const Rectangle<int> area (panel->getComponentArea()); | |||
| @@ -566,7 +566,7 @@ void JucerDocumentEditor::addComponent (const int index) | |||
| { | |||
| showLayout(); | |||
| if (ComponentLayoutPanel* const panel = dynamic_cast <ComponentLayoutPanel*> (tabbedComponent.getCurrentContentComponent())) | |||
| if (ComponentLayoutPanel* const panel = dynamic_cast<ComponentLayoutPanel*> (tabbedComponent.getCurrentContentComponent())) | |||
| { | |||
| const Rectangle<int> area (panel->getComponentArea()); | |||
| @@ -934,7 +934,7 @@ bool JucerDocumentEditor::perform (const InvocationInfo& info) | |||
| case JucerCommandIDs::zoomNormal: setZoom (1.0); break; | |||
| case JucerCommandIDs::spaceBarDrag: | |||
| if (EditingPanelBase* panel = dynamic_cast <EditingPanelBase*> (tabbedComponent.getCurrentContentComponent())) | |||
| if (EditingPanelBase* panel = dynamic_cast<EditingPanelBase*> (tabbedComponent.getCurrentContentComponent())) | |||
| panel->dragKeyHeldDown (info.isKeyDown); | |||
| break; | |||
| @@ -958,7 +958,7 @@ bool JucerDocumentEditor::perform (const InvocationInfo& info) | |||
| break; | |||
| case JucerCommandIDs::bringBackLostItems: | |||
| if (EditingPanelBase* panel = dynamic_cast <EditingPanelBase*> (tabbedComponent.getCurrentContentComponent())) | |||
| if (EditingPanelBase* panel = dynamic_cast<EditingPanelBase*> (tabbedComponent.getCurrentContentComponent())) | |||
| { | |||
| int w = panel->getComponentArea().getWidth(); | |||
| int h = panel->getComponentArea().getHeight(); | |||
| @@ -56,7 +56,7 @@ PaintRoutineEditor::~PaintRoutineEditor() | |||
| void PaintRoutineEditor::removeAllElementComps() | |||
| { | |||
| for (int i = getNumChildComponents(); --i >= 0;) | |||
| if (PaintElement* const e = dynamic_cast <PaintElement*> (getChildComponent (i))) | |||
| if (PaintElement* const e = dynamic_cast<PaintElement*> (getChildComponent (i))) | |||
| removeChildComponent (e); | |||
| } | |||
| @@ -109,7 +109,7 @@ void PaintRoutineEditor::updateChildBounds() | |||
| const Rectangle<int> clip (getComponentArea()); | |||
| for (int i = 0; i < getNumChildComponents(); ++i) | |||
| if (PaintElement* const e = dynamic_cast <PaintElement*> (getChildComponent (i))) | |||
| if (PaintElement* const e = dynamic_cast<PaintElement*> (getChildComponent (i))) | |||
| e->updateBounds (clip); | |||
| } | |||
| @@ -153,7 +153,7 @@ void PaintRoutineEditor::visibilityChanged() | |||
| void PaintRoutineEditor::refreshAllElements() | |||
| { | |||
| for (int i = getNumChildComponents(); --i >= 0;) | |||
| if (PaintElement* const e = dynamic_cast <PaintElement*> (getChildComponent (i))) | |||
| if (PaintElement* const e = dynamic_cast<PaintElement*> (getChildComponent (i))) | |||
| if (! graphics.containsElement (e)) | |||
| removeChildComponent (e); | |||
| @@ -241,7 +241,7 @@ void PaintRoutineEditor::mouseUp (const MouseEvent& e) | |||
| void PaintRoutineEditor::findLassoItemsInArea (Array <PaintElement*>& results, const Rectangle<int>& lasso) | |||
| { | |||
| for (int i = 0; i < getNumChildComponents(); ++i) | |||
| if (PaintElement* const e = dynamic_cast <PaintElement*> (getChildComponent (i))) | |||
| if (PaintElement* const e = dynamic_cast<PaintElement*> (getChildComponent (i))) | |||
| if (e->getBounds().expanded (-e->borderThickness).intersects (lasso)) | |||
| results.add (e); | |||
| } | |||
| @@ -395,7 +395,7 @@ private: | |||
| for (ConstConfigIterator config (*this); config.next();) | |||
| { | |||
| const XcodeBuildConfiguration& xcodeConfig = dynamic_cast <const XcodeBuildConfiguration&> (*config); | |||
| const XcodeBuildConfiguration& xcodeConfig = dynamic_cast<const XcodeBuildConfiguration&> (*config); | |||
| addProjectConfig (config->getName(), getProjectSettings (xcodeConfig)); | |||
| addTargetConfig (config->getName(), getTargetSettings (xcodeConfig)); | |||
| } | |||
| @@ -278,7 +278,7 @@ private: | |||
| void writeMainProjectFile() | |||
| { | |||
| ScopedPointer <XmlElement> xml (project.getProjectRoot().createXml()); | |||
| ScopedPointer<XmlElement> xml (project.getProjectRoot().createXml()); | |||
| jassert (xml != nullptr); | |||
| if (xml != nullptr) | |||
| @@ -59,7 +59,7 @@ namespace | |||
| inline String getPluginRTASCategoryCode (Project& project) | |||
| { | |||
| if (static_cast <bool> (getPluginIsSynth (project).getValue())) | |||
| if (static_cast<bool> (getPluginIsSynth (project).getValue())) | |||
| return "ePlugInCategory_SWGenerators"; | |||
| String s (getPluginRTASCategory (project).toString()); | |||
| @@ -83,7 +83,7 @@ public: | |||
| Project::Item child (item.getChild (rowNumber)); | |||
| if (existingComponentToUpdate == nullptr | |||
| || dynamic_cast <FileOptionComponent*> (existing.get())->item != child) | |||
| || dynamic_cast<FileOptionComponent*> (existing.get())->item != child) | |||
| { | |||
| existing = nullptr; | |||
| existing = new FileOptionComponent (child); | |||
| @@ -436,7 +436,7 @@ void LibraryModule::getConfigFlags (Project& project, OwnedArray<Project::Config | |||
| if (line.startsWith ("/**") && line.containsIgnoreCase ("Config:")) | |||
| { | |||
| ScopedPointer <Project::ConfigFlag> config (new Project::ConfigFlag()); | |||
| ScopedPointer<Project::ConfigFlag> config (new Project::ConfigFlag()); | |||
| config->sourceModuleID = getID(); | |||
| config->symbol = line.fromFirstOccurrenceOf (":", false, false).trim(); | |||
| @@ -256,7 +256,7 @@ static void registerRecentFile (const File& file) | |||
| //============================================================================== | |||
| Result Project::loadDocument (const File& file) | |||
| { | |||
| ScopedPointer <XmlElement> xml (XmlDocument::parse (file)); | |||
| ScopedPointer<XmlElement> xml (XmlDocument::parse (file)); | |||
| if (xml == nullptr || ! xml->hasTagName (Ids::JUCERPROJECT.toString())) | |||
| return Result::fail ("Not a valid Jucer project!"); | |||
| @@ -34,7 +34,7 @@ namespace FileHelpers | |||
| int64 t = 0; | |||
| for (size_t i = 0; i < numBytes; ++i) | |||
| t = t * 65599 + static_cast <const uint8*> (data)[i]; | |||
| t = t * 65599 + static_cast<const uint8*> (data)[i]; | |||
| return t; | |||
| } | |||
| @@ -44,7 +44,7 @@ namespace FileHelpers | |||
| int64 t = 0; | |||
| const int bufferSize = 4096; | |||
| HeapBlock <uint8> buffer; | |||
| HeapBlock<uint8> buffer; | |||
| buffer.malloc (bufferSize); | |||
| for (;;) | |||
| @@ -63,7 +63,7 @@ namespace FileHelpers | |||
| int64 calculateFileHashCode (const File& file) | |||
| { | |||
| ScopedPointer <FileInputStream> stream (file.createInputStream()); | |||
| ScopedPointer<FileInputStream> stream (file.createInputStream()); | |||
| return stream != nullptr ? calculateStreamHashCode (*stream) : 0; | |||
| } | |||
| @@ -964,7 +964,7 @@ const uint8 mainJuceLogo[] = { 110,109,104,98,101,67,226,177,185,67,98,216,179,8 | |||
| path->setAttribute ("d", pathString); | |||
| ScopedPointer<Drawable> d (Drawable::createFromSVG (svg)); | |||
| DrawablePath* dp = dynamic_cast <DrawablePath*> (d->getChildComponent(0)); | |||
| DrawablePath* dp = dynamic_cast<DrawablePath*> (d->getChildComponent(0)); | |||
| jassert (dp != nullptr); | |||
| Path p (dp->getPath()); | |||
| @@ -215,7 +215,7 @@ void JucerTreeViewBase::handlePopupMenuResult (int) | |||
| ProjectContentComponent* JucerTreeViewBase::getProjectContentComponent() const | |||
| { | |||
| for (Component* c = getOwnerView(); c != nullptr; c = c->getParentComponent()) | |||
| if (ProjectContentComponent* pcc = dynamic_cast <ProjectContentComponent*> (c)) | |||
| if (ProjectContentComponent* pcc = dynamic_cast<ProjectContentComponent*> (c)) | |||
| return pcc; | |||
| return nullptr; | |||
| @@ -325,7 +325,7 @@ String RolloverHelpComp::findTip (Component* c) | |||
| { | |||
| while (c != nullptr) | |||
| { | |||
| if (TooltipClient* const tc = dynamic_cast <TooltipClient*> (c)) | |||
| if (TooltipClient* const tc = dynamic_cast<TooltipClient*> (c)) | |||
| { | |||
| const String tip (tc->getTooltip()); | |||
| @@ -42,10 +42,10 @@ public: | |||
| void setValue (const var& newValue) override | |||
| { | |||
| const Type newVal = static_cast <Type> (newValue); | |||
| const Type newVal = static_cast<Type> (newValue); | |||
| if (newVal != static_cast <Type> (getValue())) // this test is important, because if a property is missing, it won't | |||
| sourceValue = newVal; // create it (causing an unwanted undo action) when a control sets it to 0 | |||
| if (newVal != static_cast<Type> (getValue())) // this test is important, because if a property is missing, it won't | |||
| sourceValue = newVal; // create it (causing an unwanted undo action) when a control sets it to 0 | |||
| } | |||
| JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (NumericValueSource) | |||
| @@ -99,7 +99,7 @@ public: | |||
| class Int8 | |||
| { | |||
| public: | |||
| inline Int8 (void* d) noexcept : data (static_cast <int8*> (d)) {} | |||
| inline Int8 (void* d) noexcept : data (static_cast<int8*> (d)) {} | |||
| inline void advance() noexcept { ++data; } | |||
| inline void skip (int numSamples) noexcept { data += numSamples; } | |||
| @@ -124,7 +124,7 @@ public: | |||
| class UInt8 | |||
| { | |||
| public: | |||
| inline UInt8 (void* d) noexcept : data (static_cast <uint8*> (d)) {} | |||
| inline UInt8 (void* d) noexcept : data (static_cast<uint8*> (d)) {} | |||
| inline void advance() noexcept { ++data; } | |||
| inline void skip (int numSamples) noexcept { data += numSamples; } | |||
| @@ -149,7 +149,7 @@ public: | |||
| class Int16 | |||
| { | |||
| public: | |||
| inline Int16 (void* d) noexcept : data (static_cast <uint16*> (d)) {} | |||
| inline Int16 (void* d) noexcept : data (static_cast<uint16*> (d)) {} | |||
| inline void advance() noexcept { ++data; } | |||
| inline void skip (int numSamples) noexcept { data += numSamples; } | |||
| @@ -174,7 +174,7 @@ public: | |||
| class Int24 | |||
| { | |||
| public: | |||
| inline Int24 (void* d) noexcept : data (static_cast <char*> (d)) {} | |||
| inline Int24 (void* d) noexcept : data (static_cast<char*> (d)) {} | |||
| inline void advance() noexcept { data += 3; } | |||
| inline void skip (int numSamples) noexcept { data += 3 * numSamples; } | |||
| @@ -199,7 +199,7 @@ public: | |||
| class Int32 | |||
| { | |||
| public: | |||
| inline Int32 (void* d) noexcept : data (static_cast <uint32*> (d)) {} | |||
| inline Int32 (void* d) noexcept : data (static_cast<uint32*> (d)) {} | |||
| inline void advance() noexcept { ++data; } | |||
| inline void skip (int numSamples) noexcept { data += numSamples; } | |||
| @@ -245,7 +245,7 @@ public: | |||
| class Float32 | |||
| { | |||
| public: | |||
| inline Float32 (void* d) noexcept : data (static_cast <float*> (d)) {} | |||
| inline Float32 (void* d) noexcept : data (static_cast<float*> (d)) {} | |||
| inline void advance() noexcept { ++data; } | |||
| inline void skip (int numSamples) noexcept { data += numSamples; } | |||
| @@ -318,7 +318,7 @@ public: | |||
| { | |||
| public: | |||
| typedef const void VoidType; | |||
| static inline void* toVoidPtr (VoidType* v) noexcept { return const_cast <void*> (v); } | |||
| static inline void* toVoidPtr (VoidType* v) noexcept { return const_cast<void*> (v); } | |||
| enum { isConst = 1 }; | |||
| }; | |||
| #endif | |||
| @@ -254,12 +254,12 @@ bool MidiFile::readFrom (InputStream& sourceStream) | |||
| if (sourceStream.readIntoMemoryBlock (data, maxSensibleMidiFileSize)) | |||
| { | |||
| size_t size = data.getSize(); | |||
| const uint8* d = static_cast <const uint8*> (data.getData()); | |||
| const uint8* d = static_cast<const uint8*> (data.getData()); | |||
| short fileType, expectedTracks; | |||
| if (size > 16 && MidiFileHelpers::parseMidiHeader (d, timeFormat, fileType, expectedTracks)) | |||
| { | |||
| size -= (size_t) (d - static_cast <const uint8*> (data.getData())); | |||
| size -= (size_t) (d - static_cast<const uint8*> (data.getData())); | |||
| int track = 0; | |||
| @@ -672,7 +672,7 @@ bool MidiMessage::isTextMetaEvent() const noexcept | |||
| String MidiMessage::getTextFromTextMetaEvent() const | |||
| { | |||
| const char* const textData = reinterpret_cast <const char*> (getMetaEventData()); | |||
| const char* const textData = reinterpret_cast<const char*> (getMetaEventData()); | |||
| return String (CharPointer_UTF8 (textData), | |||
| CharPointer_UTF8 (textData + getMetaEventLength())); | |||
| } | |||
| @@ -151,7 +151,7 @@ private: | |||
| File volumeDir; | |||
| Array<File> tracks; | |||
| int currentReaderTrack; | |||
| ScopedPointer <AudioFormatReader> reader; | |||
| ScopedPointer<AudioFormatReader> reader; | |||
| AudioCDReader (const File& volume); | |||
| #elif JUCE_WINDOWS | |||
| @@ -51,7 +51,7 @@ public: | |||
| void pushMidiData (const void* inputData, int numBytes, double time, | |||
| UserDataType* input, CallbackType& callback) | |||
| { | |||
| const uint8* d = static_cast <const uint8*> (inputData); | |||
| const uint8* d = static_cast<const uint8*> (inputData); | |||
| while (numBytes > 0) | |||
| { | |||
| @@ -393,13 +393,13 @@ private: | |||
| static void interruptionListenerCallback (void* client, UInt32 interruptionType) | |||
| { | |||
| const Array <iOSAudioIODevice*>& activeDevices = static_cast <AudioSessionHolder*> (client)->activeDevices; | |||
| const Array<iOSAudioIODevice*>& activeDevices = static_cast<AudioSessionHolder*> (client)->activeDevices; | |||
| for (int i = activeDevices.size(); --i >= 0;) | |||
| activeDevices.getUnchecked(i)->interruptionListener (interruptionType); | |||
| } | |||
| Array <iOSAudioIODevice*> activeDevices; | |||
| Array<iOSAudioIODevice*> activeDevices; | |||
| }; | |||
| static AudioSessionHolder& getSessionHolder() | |||
| @@ -993,7 +993,7 @@ public: | |||
| { | |||
| jassert (hasScanned); // need to call scanForDevices() before doing this | |||
| if (ALSAAudioIODevice* d = dynamic_cast <ALSAAudioIODevice*> (device)) | |||
| if (ALSAAudioIODevice* d = dynamic_cast<ALSAAudioIODevice*> (device)) | |||
| return asInput ? inputIds.indexOf (d->inputId) | |||
| : outputIds.indexOf (d->outputId); | |||
| @@ -388,7 +388,7 @@ private: | |||
| if (callback != nullptr) | |||
| { | |||
| if ((numActiveInChans + numActiveOutChans) > 0) | |||
| callback->audioDeviceIOCallback (const_cast <const float**> (inChans.getData()), numActiveInChans, | |||
| callback->audioDeviceIOCallback (const_cast<const float**> (inChans.getData()), numActiveInChans, | |||
| outChans, numActiveOutChans, numSamples); | |||
| } | |||
| else | |||
| @@ -437,7 +437,7 @@ private: | |||
| static void portConnectCallback (jack_port_id_t, jack_port_id_t, int, void* arg) | |||
| { | |||
| if (JackAudioIODevice* device = static_cast <JackAudioIODevice*> (arg)) | |||
| if (JackAudioIODevice* device = static_cast<JackAudioIODevice*> (arg)) | |||
| device->updateActivePorts(); | |||
| } | |||
| @@ -470,7 +470,7 @@ private: | |||
| AudioIODeviceCallback* callback; | |||
| CriticalSection callbackLock; | |||
| HeapBlock <float*> inChans, outChans; | |||
| HeapBlock<float*> inChans, outChans; | |||
| int totalNumberOfInputChannels; | |||
| int totalNumberOfOutputChannels; | |||
| Array<void*> inputPorts, outputPorts; | |||
| @@ -557,7 +557,7 @@ public: | |||
| { | |||
| jassert (hasScanned); // need to call scanForDevices() before doing this | |||
| if (JackAudioIODevice* d = dynamic_cast <JackAudioIODevice*> (device)) | |||
| if (JackAudioIODevice* d = dynamic_cast<JackAudioIODevice*> (device)) | |||
| return asInput ? inputIds.indexOf (d->inputId) | |||
| : outputIds.indexOf (d->outputId); | |||
| @@ -136,7 +136,7 @@ private: | |||
| HeapBlock<pollfd> pfd ((size_t) numPfds); | |||
| snd_seq_poll_descriptors (seqHandle, pfd, (unsigned int) numPfds, POLLIN); | |||
| HeapBlock <uint8> buffer (maxEventSize); | |||
| HeapBlock<uint8> buffer (maxEventSize); | |||
| while (! threadShouldExit()) | |||
| { | |||
| @@ -785,7 +785,7 @@ private: | |||
| HeapBlock<ASIOSampleFormat> inputFormat, outputFormat; | |||
| WaitableEvent event1; | |||
| HeapBlock <float> tempBuffer; | |||
| HeapBlock<float> tempBuffer; | |||
| int volatile bufferIndex, numActiveInputChans, numActiveOutputChans; | |||
| bool deviceIsOpen, isStarted, buffersCreated; | |||
| @@ -367,7 +367,7 @@ bool AudioCDBurner::addAudioTrack (AudioSource* audioSource, int numSamples) | |||
| hr = pimpl->redbook->CreateAudioTrack ((long) numSamples / (bytesPerBlock * 4)); | |||
| HeapBlock <byte> buffer (bytesPerBlock); | |||
| HeapBlock<byte> buffer (bytesPerBlock); | |||
| AudioSampleBuffer sourceBuffer (2, samplesPerBlock); | |||
| int samplesDone = 0; | |||
| @@ -1027,7 +1027,7 @@ AudioCDReader::AudioCDReader (void* handle_) | |||
| AudioCDReader::~AudioCDReader() | |||
| { | |||
| using namespace CDReaderHelpers; | |||
| CDDeviceWrapper* const device = static_cast <CDDeviceWrapper*> (handle); | |||
| CDDeviceWrapper* const device = static_cast<CDDeviceWrapper*> (handle); | |||
| delete device; | |||
| } | |||
| @@ -1035,7 +1035,7 @@ bool AudioCDReader::readSamples (int** destSamples, int numDestChannels, int sta | |||
| int64 startSampleInFile, int numSamples) | |||
| { | |||
| using namespace CDReaderHelpers; | |||
| CDDeviceWrapper* const device = static_cast <CDDeviceWrapper*> (handle); | |||
| CDDeviceWrapper* const device = static_cast<CDDeviceWrapper*> (handle); | |||
| bool ok = true; | |||
| @@ -1131,7 +1131,7 @@ bool AudioCDReader::isCDStillPresent() const | |||
| { | |||
| using namespace CDReaderHelpers; | |||
| TOC toc = { 0 }; | |||
| return static_cast <CDDeviceWrapper*> (handle)->deviceHandle.readTOC (&toc); | |||
| return static_cast<CDDeviceWrapper*> (handle)->deviceHandle.readTOC (&toc); | |||
| } | |||
| void AudioCDReader::refreshTrackLengths() | |||
| @@ -1142,7 +1142,7 @@ void AudioCDReader::refreshTrackLengths() | |||
| TOC toc = { 0 }; | |||
| if (static_cast <CDDeviceWrapper*> (handle)->deviceHandle.readTOC (&toc)) | |||
| if (static_cast<CDDeviceWrapper*> (handle)->deviceHandle.readTOC (&toc)) | |||
| { | |||
| int numTracks = 1 + toc.lastTrack - toc.firstTrack; | |||
| @@ -1174,7 +1174,7 @@ int AudioCDReader::getLastIndex() const | |||
| int AudioCDReader::getIndexAt (int samplePos) | |||
| { | |||
| using namespace CDReaderHelpers; | |||
| CDDeviceWrapper* const device = static_cast <CDDeviceWrapper*> (handle); | |||
| CDDeviceWrapper* const device = static_cast<CDDeviceWrapper*> (handle); | |||
| const int frameNeeded = samplePos / samplesPerFrame; | |||
| @@ -1255,7 +1255,7 @@ Array<int> AudioCDReader::findIndexesInTrack (const int trackNumber) | |||
| if (needToScan) | |||
| { | |||
| CDDeviceWrapper* const device = static_cast <CDDeviceWrapper*> (handle); | |||
| CDDeviceWrapper* const device = static_cast<CDDeviceWrapper*> (handle); | |||
| int pos = trackStart; | |||
| int last = -1; | |||
| @@ -1305,5 +1305,5 @@ Array<int> AudioCDReader::findIndexesInTrack (const int trackNumber) | |||
| void AudioCDReader::ejectDisk() | |||
| { | |||
| using namespace CDReaderHelpers; | |||
| static_cast <CDDeviceWrapper*> (handle)->deviceHandle.openDrawer (true); | |||
| static_cast<CDDeviceWrapper*> (handle)->deviceHandle.openDrawer (true); | |||
| } | |||
| @@ -1226,7 +1226,7 @@ public: | |||
| { | |||
| jassert (hasScanned); // need to call scanForDevices() before doing this | |||
| if (DSoundAudioIODevice* const d = dynamic_cast <DSoundAudioIODevice*> (device)) | |||
| if (DSoundAudioIODevice* const d = dynamic_cast<DSoundAudioIODevice*> (device)) | |||
| return asInput ? d->inputDeviceIndex | |||
| : d->outputDeviceIndex; | |||
| @@ -116,7 +116,7 @@ public: | |||
| static void CALLBACK midiInCallback (HMIDIIN, UINT uMsg, DWORD_PTR dwInstance, | |||
| DWORD_PTR midiMessage, DWORD_PTR timeStamp) | |||
| { | |||
| MidiInCollector* const collector = reinterpret_cast <MidiInCollector*> (dwInstance); | |||
| MidiInCollector* const collector = reinterpret_cast<MidiInCollector*> (dwInstance); | |||
| if (activeMidiCollectors.contains (collector)) | |||
| { | |||
| @@ -270,8 +270,8 @@ MidiInput* MidiInput::openDevice (const int index, MidiInputCallback* const call | |||
| } | |||
| } | |||
| ScopedPointer <MidiInput> in (new MidiInput (name)); | |||
| ScopedPointer <MidiInCollector> collector (new MidiInCollector (in, *callback)); | |||
| ScopedPointer<MidiInput> in (new MidiInput (name)); | |||
| ScopedPointer<MidiInCollector> collector (new MidiInCollector (in, *callback)); | |||
| HMIDIIN h; | |||
| MMRESULT err = midiInOpen (&h, deviceId, | |||
| @@ -531,7 +531,7 @@ public: | |||
| } | |||
| else if (type == chunkName ("INST")) | |||
| { | |||
| HeapBlock <InstChunk> inst; | |||
| HeapBlock<InstChunk> inst; | |||
| inst.calloc (jmax ((size_t) length + 1, sizeof (InstChunk)), 1); | |||
| input->read (inst, (int) length); | |||
| inst->copyTo (metadataValues); | |||
| @@ -972,7 +972,7 @@ bool AiffAudioFormat::canHandleFile (const File& f) | |||
| AudioFormatReader* AiffAudioFormat::createReaderFor (InputStream* sourceStream, const bool deleteStreamIfOpeningFails) | |||
| { | |||
| ScopedPointer <AiffAudioFormatReader> w (new AiffAudioFormatReader (sourceStream)); | |||
| ScopedPointer<AiffAudioFormatReader> w (new AiffAudioFormatReader (sourceStream)); | |||
| if (w->sampleRate > 0 && w->numChannels > 0) | |||
| return w.release(); | |||
| @@ -3020,7 +3020,7 @@ public: | |||
| } | |||
| const int numToCopy = jmin (decodedEnd - decodedStart, numSamples); | |||
| float* const* const dst = reinterpret_cast <float**> (destSamples); | |||
| float* const* const dst = reinterpret_cast<float**> (destSamples); | |||
| memcpy (dst[0] + startOffsetInDestBuffer, decoded0 + decodedStart, sizeof (float) * (size_t) numToCopy); | |||
| if (numDestChannels > 1 && dst[1] != nullptr) | |||
| @@ -428,7 +428,7 @@ private: | |||
| const String s (metadata [name]); | |||
| if (s.isNotEmpty()) | |||
| vorbis_comment_add_tag (&vc, vorbisName, const_cast <char*> (s.toRawUTF8())); | |||
| vorbis_comment_add_tag (&vc, vorbisName, const_cast<char*> (s.toRawUTF8())); | |||
| } | |||
| JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (OggWriter) | |||
| @@ -483,8 +483,8 @@ AudioFormatWriter* OggVorbisAudioFormat::createWriterFor (OutputStream* out, | |||
| const StringPairArray& metadataValues, | |||
| int qualityOptionIndex) | |||
| { | |||
| ScopedPointer <OggWriter> w (new OggWriter (out, sampleRate, numChannels, | |||
| (unsigned int) bitsPerSample, qualityOptionIndex, metadataValues)); | |||
| ScopedPointer<OggWriter> w (new OggWriter (out, sampleRate, numChannels, | |||
| (unsigned int) bitsPerSample, qualityOptionIndex, metadataValues)); | |||
| return w->ok ? w.release() : nullptr; | |||
| } | |||
| @@ -142,7 +142,7 @@ public: | |||
| if (err != noErr) | |||
| return; | |||
| HeapBlock <AudioChannelLayout> qt_audio_channel_layout; | |||
| HeapBlock<AudioChannelLayout> qt_audio_channel_layout; | |||
| qt_audio_channel_layout.calloc (output_layout_size, 1); | |||
| MovieAudioExtractionGetProperty (extractor, | |||
| @@ -322,8 +322,8 @@ private: | |||
| Thread::ThreadID lastThreadId; | |||
| MovieAudioExtractionRef extractor; | |||
| AudioStreamBasicDescription inputStreamDesc; | |||
| HeapBlock <AudioBufferList> bufferList; | |||
| HeapBlock <char> dataBuffer; | |||
| HeapBlock<AudioBufferList> bufferList; | |||
| HeapBlock<char> dataBuffer; | |||
| Handle dataHandle; | |||
| //============================================================================== | |||
| @@ -151,7 +151,7 @@ AudioFormatReader* AudioFormatManager::createReaderFor (InputStream* audioFileSt | |||
| // use them to open a file! | |||
| jassert (getNumKnownFormats() > 0); | |||
| ScopedPointer <InputStream> in (audioFileStream); | |||
| ScopedPointer<InputStream> in (audioFileStream); | |||
| if (in != nullptr) | |||
| { | |||
| @@ -95,7 +95,7 @@ bool AudioFormatWriter::writeFromAudioReader (AudioFormatReader& reader, | |||
| } | |||
| } | |||
| if (! write (const_cast <const int**> (buffers), numToDo)) | |||
| if (! write (const_cast<const int**> (buffers), numToDo)) | |||
| return false; | |||
| numSamplesToRead -= numToDo; | |||
| @@ -93,7 +93,7 @@ void SamplerVoice::startNote (const int midiNoteNumber, | |||
| SynthesiserSound* s, | |||
| const int /*currentPitchWheelPosition*/) | |||
| { | |||
| if (const SamplerSound* const sound = dynamic_cast <const SamplerSound*> (s)) | |||
| if (const SamplerSound* const sound = dynamic_cast<const SamplerSound*> (s)) | |||
| { | |||
| pitchRatio = pow (2.0, (midiNoteNumber - sound->midiRootNote) / 12.0) | |||
| * sound->sourceSampleRate / getSampleRate(); | |||
| @@ -152,7 +152,7 @@ void SamplerVoice::controllerMoved (const int /*controllerNumber*/, | |||
| //============================================================================== | |||
| void SamplerVoice::renderNextBlock (AudioSampleBuffer& outputBuffer, int startSample, int numSamples) | |||
| { | |||
| if (const SamplerSound* const playingSound = static_cast <SamplerSound*> (getCurrentlyPlayingSound().get())) | |||
| if (const SamplerSound* const playingSound = static_cast<SamplerSound*> (getCurrentlyPlayingSound().get())) | |||
| { | |||
| const float* const inL = playingSound->data->getReadPointer (0); | |||
| const float* const inR = playingSound->data->getNumChannels() > 1 | |||
| @@ -421,7 +421,7 @@ public: | |||
| JuceCustomUIView* getView() const | |||
| { | |||
| return dynamic_cast <JuceCustomUIView*> (fOurPlugInView); | |||
| return dynamic_cast<JuceCustomUIView*> (fOurPlugInView); | |||
| } | |||
| void GetViewRect (Rect* size) override | |||
| @@ -478,11 +478,11 @@ public: | |||
| if (MIDILogIn() == noErr) | |||
| { | |||
| #if JucePlugin_WantsMidiInput | |||
| if (CEffectType* const type = dynamic_cast <CEffectType*> (this->GetProcessType())) | |||
| if (CEffectType* const type = dynamic_cast<CEffectType*> (this->GetProcessType())) | |||
| { | |||
| char nodeName [64]; | |||
| type->GetProcessTypeName (63, nodeName); | |||
| p2cstrcpy (nodeName, reinterpret_cast <unsigned char*> (nodeName)); | |||
| p2cstrcpy (nodeName, reinterpret_cast<unsigned char*> (nodeName)); | |||
| midiBufferNode = new CEffectMIDIOtherBufferedNode (&mMIDIWorld, | |||
| 8192, | |||
| @@ -33,19 +33,19 @@ void AudioPluginFormatManager::addDefaultFormats() | |||
| for (int i = formats.size(); --i >= 0;) | |||
| { | |||
| #if JUCE_PLUGINHOST_VST | |||
| jassert (dynamic_cast <VSTPluginFormat*> (formats[i]) == nullptr); | |||
| jassert (dynamic_cast<VSTPluginFormat*> (formats[i]) == nullptr); | |||
| #endif | |||
| #if JUCE_PLUGINHOST_VST3 | |||
| jassert (dynamic_cast <VST3PluginFormat*> (formats[i]) == nullptr); | |||
| jassert (dynamic_cast<VST3PluginFormat*> (formats[i]) == nullptr); | |||
| #endif | |||
| #if JUCE_PLUGINHOST_AU && JUCE_MAC | |||
| jassert (dynamic_cast <AudioUnitPluginFormat*> (formats[i]) == nullptr); | |||
| jassert (dynamic_cast<AudioUnitPluginFormat*> (formats[i]) == nullptr); | |||
| #endif | |||
| #if JUCE_PLUGINHOST_LADSPA && JUCE_LINUX | |||
| jassert (dynamic_cast <LADSPAPluginFormat*> (formats[i]) == nullptr); | |||
| jassert (dynamic_cast<LADSPAPluginFormat*> (formats[i]) == nullptr); | |||
| #endif | |||
| } | |||
| #endif | |||
| @@ -909,7 +909,7 @@ private: | |||
| CriticalSection lock; | |||
| bool wantsMidiMessages, producesMidiMessages, wasPlaying, prepared; | |||
| HeapBlock <AudioBufferList> outputBufferList; | |||
| HeapBlock<AudioBufferList> outputBufferList; | |||
| AudioTimeStamp timeStamp; | |||
| AudioSampleBuffer* currentBuffer; | |||
| AudioUnitElement numInputBusChannels, numOutputBusChannels, numInputBusses, numOutputBusses; | |||
| @@ -1389,7 +1389,7 @@ private: | |||
| && AudioUnitGetPropertyInfo (plugin.audioUnit, kAudioUnitProperty_CocoaUI, kAudioUnitScope_Global, | |||
| 0, &dataSize, &isWritable) == noErr) | |||
| { | |||
| HeapBlock <AudioUnitCocoaViewInfo> info; | |||
| HeapBlock<AudioUnitCocoaViewInfo> info; | |||
| info.calloc (dataSize, 1); | |||
| if (AudioUnitGetProperty (plugin.audioUnit, kAudioUnitProperty_CocoaUI, kAudioUnitScope_Global, | |||
| @@ -451,7 +451,7 @@ public: | |||
| void setStateInformation (const void* data, int sizeInBytes) | |||
| { | |||
| const float* p = static_cast <const float*> (data); | |||
| const float* p = static_cast<const float*> (data); | |||
| for (int i = 0; i < getNumParameters(); ++i) | |||
| setParameter (i, p[i]); | |||
| @@ -160,7 +160,7 @@ public: | |||
| } | |||
| //============================================================================== | |||
| HeapBlock <VstEvents> events; | |||
| HeapBlock<VstEvents> events; | |||
| private: | |||
| int numEventsUsed, numEventsAllocated; | |||
| @@ -318,7 +318,7 @@ public: | |||
| DISPID id = 0; | |||
| if (source->GetIDsOfNames (IID_NULL, (LPOLESTR*) &name, 1, 0, &id) == S_OK) | |||
| { | |||
| HeapBlock <VARIANT> params; | |||
| HeapBlock<VARIANT> params; | |||
| params.calloc (args.numArguments + 1); | |||
| for (int i = 0; i < args.numArguments; ++i) | |||
| @@ -548,7 +548,7 @@ static String getExeVersion (const String& exeFileName, const String& fieldName) | |||
| if (size > 0) | |||
| { | |||
| HeapBlock <char> exeInfo; | |||
| HeapBlock<char> exeInfo; | |||
| exeInfo.calloc (size); | |||
| if (GetFileVersionInfo (exeFileName.toUTF16(), 0, size, exeInfo)) | |||
| @@ -1154,9 +1154,7 @@ NPError NPP_SetValue (NPP npp, NPNVariable variable, void* value) | |||
| //============================================================================== | |||
| static NPP getInstance (const BrowserPluginComponent* bpc) | |||
| { | |||
| BrowserPluginHolderComponent* holder = dynamic_cast <BrowserPluginHolderComponent*> (bpc->getParentComponent()); | |||
| if (holder != nullptr) | |||
| if (BrowserPluginHolderComponent* holder = dynamic_cast<BrowserPluginHolderComponent*> (bpc->getParentComponent())) | |||
| return holder->npp; | |||
| return currentlyInitialisingNPP; | |||
| @@ -365,7 +365,7 @@ public: | |||
| for (; e != end_; ++e) | |||
| if (elementToLookFor == *e) | |||
| return static_cast <int> (e - data.elements.getData()); | |||
| return static_cast<int> (e - data.elements.getData()); | |||
| return -1; | |||
| } | |||
| @@ -60,14 +60,14 @@ public: | |||
| #if JUCE_COMPILER_SUPPORTS_MOVE_SEMANTICS | |||
| ArrayAllocationBase (ArrayAllocationBase<ElementType, TypeOfCriticalSectionToUse>&& other) noexcept | |||
| : elements (static_cast <HeapBlock <ElementType>&&> (other.elements)), | |||
| : elements (static_cast<HeapBlock<ElementType>&&> (other.elements)), | |||
| numAllocated (other.numAllocated) | |||
| { | |||
| } | |||
| ArrayAllocationBase& operator= (ArrayAllocationBase<ElementType, TypeOfCriticalSectionToUse>&& other) noexcept | |||
| { | |||
| elements = static_cast <HeapBlock <ElementType>&&> (other.elements); | |||
| elements = static_cast<HeapBlock<ElementType>&&> (other.elements); | |||
| numAllocated = other.numAllocated; | |||
| return *this; | |||
| } | |||
| @@ -127,7 +127,7 @@ public: | |||
| } | |||
| //============================================================================== | |||
| HeapBlock <ElementType> elements; | |||
| HeapBlock<ElementType> elements; | |||
| int numAllocated; | |||
| private: | |||
| @@ -149,7 +149,7 @@ public: | |||
| /** Calls a member function on each listener in the list, with no parameters. */ | |||
| void call (void (ListenerClass::*callbackFunction) ()) | |||
| { | |||
| callChecked (static_cast <const DummyBailOutChecker&> (DummyBailOutChecker()), callbackFunction); | |||
| callChecked (static_cast<const DummyBailOutChecker&> (DummyBailOutChecker()), callbackFunction); | |||
| } | |||
| /** Calls a member function on each listener in the list, with no parameters and a bail-out-checker. | |||
| @@ -79,7 +79,7 @@ NamedValueSet& NamedValueSet::operator= (const NamedValueSet& other) | |||
| #if JUCE_COMPILER_SUPPORTS_MOVE_SEMANTICS | |||
| NamedValueSet::NamedValueSet (NamedValueSet&& other) noexcept | |||
| : values (static_cast <Array<NamedValue>&&> (other.values)) | |||
| : values (static_cast<Array<NamedValue>&&> (other.values)) | |||
| { | |||
| } | |||
| @@ -74,7 +74,7 @@ public: | |||
| #if JUCE_COMPILER_SUPPORTS_MOVE_SEMANTICS | |||
| OwnedArray (OwnedArray&& other) noexcept | |||
| : data (static_cast <ArrayAllocationBase <ObjectClass*, TypeOfCriticalSectionToUse>&&> (other.data)), | |||
| : data (static_cast<ArrayAllocationBase <ObjectClass*, TypeOfCriticalSectionToUse>&&> (other.data)), | |||
| numUsed (other.numUsed) | |||
| { | |||
| other.numUsed = 0; | |||
| @@ -85,7 +85,7 @@ public: | |||
| const ScopedLockType lock (getLock()); | |||
| deleteAllObjects(); | |||
| data = static_cast <ArrayAllocationBase <ObjectClass*, TypeOfCriticalSectionToUse>&&> (other.data); | |||
| data = static_cast<ArrayAllocationBase <ObjectClass*, TypeOfCriticalSectionToUse>&&> (other.data); | |||
| numUsed = other.numUsed; | |||
| other.numUsed = 0; | |||
| return *this; | |||
| @@ -239,7 +239,7 @@ public: | |||
| for (; e != end_; ++e) | |||
| if (objectToLookFor == *e) | |||
| return static_cast <int> (e - data.elements.getData()); | |||
| return static_cast<int> (e - data.elements.getData()); | |||
| return -1; | |||
| } | |||
| @@ -281,7 +281,7 @@ public: | |||
| while (e != endPointer) | |||
| { | |||
| if (objectToLookFor == *e) | |||
| return static_cast <int> (e - data.elements.getData()); | |||
| return static_cast<int> (e - data.elements.getData()); | |||
| ++e; | |||
| } | |||
| @@ -57,13 +57,13 @@ File& File::operator= (const File& other) | |||
| #if JUCE_COMPILER_SUPPORTS_MOVE_SEMANTICS | |||
| File::File (File&& other) noexcept | |||
| : fullPath (static_cast <String&&> (other.fullPath)) | |||
| : fullPath (static_cast<String&&> (other.fullPath)) | |||
| { | |||
| } | |||
| File& File::operator= (File&& other) noexcept | |||
| { | |||
| fullPath = static_cast <String&&> (other.fullPath); | |||
| fullPath = static_cast<String&&> (other.fullPath); | |||
| return *this; | |||
| } | |||
| #endif | |||
| @@ -101,7 +101,7 @@ private: | |||
| Result status; | |||
| int64 currentPosition; | |||
| size_t bufferSize, bytesInBuffer; | |||
| HeapBlock <char> buffer; | |||
| HeapBlock<char> buffer; | |||
| void openHandle(); | |||
| void closeHandle(); | |||
| @@ -48,7 +48,7 @@ | |||
| TemporaryFile temp (myTargetFile); | |||
| // create a stream to the temporary file, and write some data to it... | |||
| ScopedPointer <FileOutputStream> out (temp.getFile().createOutputStream()); | |||
| ScopedPointer<FileOutputStream> out (temp.getFile().createOutputStream()); | |||
| if (out != nullptr) | |||
| { | |||
| @@ -87,7 +87,7 @@ BigInteger::BigInteger (const BigInteger& other) | |||
| #if JUCE_COMPILER_SUPPORTS_MOVE_SEMANTICS | |||
| BigInteger::BigInteger (BigInteger&& other) noexcept | |||
| : values (static_cast <HeapBlock <uint32>&&> (other.values)), | |||
| : values (static_cast<HeapBlock<uint32>&&> (other.values)), | |||
| numValues (other.numValues), | |||
| highestBit (other.highestBit), | |||
| negative (other.negative) | |||
| @@ -96,7 +96,7 @@ BigInteger::BigInteger (BigInteger&& other) noexcept | |||
| BigInteger& BigInteger::operator= (BigInteger&& other) noexcept | |||
| { | |||
| values = static_cast <HeapBlock <uint32>&&> (other.values); | |||
| values = static_cast<HeapBlock<uint32>&&> (other.values); | |||
| numValues = other.numValues; | |||
| highestBit = other.highestBit; | |||
| negative = other.negative; | |||
| @@ -397,7 +397,7 @@ struct Expression::Helpers | |||
| JUCE_DECLARE_NON_COPYABLE (SymbolRenamingVisitor) | |||
| }; | |||
| SymbolTerm* getSymbol() const { return static_cast <SymbolTerm*> (left.get()); } | |||
| SymbolTerm* getSymbol() const { return static_cast<SymbolTerm*> (left.get()); } | |||
| JUCE_DECLARE_NON_COPYABLE (DotOperator) | |||
| }; | |||
| @@ -958,13 +958,13 @@ Expression& Expression::operator= (const Expression& other) | |||
| #if JUCE_COMPILER_SUPPORTS_MOVE_SEMANTICS | |||
| Expression::Expression (Expression&& other) noexcept | |||
| : term (static_cast <ReferenceCountedObjectPtr<Term>&&> (other.term)) | |||
| : term (static_cast<ReferenceCountedObjectPtr<Term>&&> (other.term)) | |||
| { | |||
| } | |||
| Expression& Expression::operator= (Expression&& other) noexcept | |||
| { | |||
| term = static_cast <ReferenceCountedObjectPtr<Term>&&> (other.term); | |||
| term = static_cast<ReferenceCountedObjectPtr<Term>&&> (other.term); | |||
| return *this; | |||
| } | |||
| #endif | |||
| @@ -245,7 +245,7 @@ template <> | |||
| inline bool isPositiveAndBelow (const int valueToTest, const int upperLimit) noexcept | |||
| { | |||
| jassert (upperLimit >= 0); // makes no sense to call this if the upper limit is itself below zero.. | |||
| return static_cast <unsigned int> (valueToTest) < static_cast <unsigned int> (upperLimit); | |||
| return static_cast<unsigned int> (valueToTest) < static_cast<unsigned int> (upperLimit); | |||
| } | |||
| /** Returns true if a value is at least zero, and also less than or equal to a specified upper limit. | |||
| @@ -264,7 +264,7 @@ template <> | |||
| inline bool isPositiveAndNotGreaterThan (const int valueToTest, const int upperLimit) noexcept | |||
| { | |||
| jassert (upperLimit >= 0); // makes no sense to call this if the upper limit is itself below zero.. | |||
| return static_cast <unsigned int> (valueToTest) <= static_cast <unsigned int> (upperLimit); | |||
| return static_cast<unsigned int> (valueToTest) <= static_cast<unsigned int> (upperLimit); | |||
| } | |||
| //============================================================================== | |||
| @@ -178,7 +178,7 @@ private: | |||
| template <typename PointerType> | |||
| inline PointerType* negateValue (PointerType* n) noexcept | |||
| { | |||
| return reinterpret_cast <PointerType*> (-reinterpret_cast <pointer_sized_int> (n)); | |||
| return reinterpret_cast<PointerType*> (-reinterpret_cast<pointer_sized_int> (n)); | |||
| } | |||
| }; | |||
| @@ -260,7 +260,7 @@ public: | |||
| */ | |||
| template <class Convertible> | |||
| ReferenceCountedObjectPtr (const ReferenceCountedObjectPtr<Convertible>& other) noexcept | |||
| : referencedObject (static_cast <ReferencedType*> (other.get())) | |||
| : referencedObject (static_cast<ReferencedType*> (other.get())) | |||
| { | |||
| incIfNotNull (referencedObject); | |||
| } | |||
| @@ -98,8 +98,8 @@ public: | |||
| WeakReference& operator= (ObjectType* const newObject) { holder = getRef (newObject); return *this; } | |||
| #if JUCE_COMPILER_SUPPORTS_MOVE_SEMANTICS | |||
| WeakReference (WeakReference&& other) noexcept : holder (static_cast <SharedRef&&> (other.holder)) {} | |||
| WeakReference& operator= (WeakReference&& other) noexcept { holder = static_cast <SharedRef&&> (other.holder); return *this; } | |||
| WeakReference (WeakReference&& other) noexcept : holder (static_cast<SharedRef&&> (other.holder)) {} | |||
| WeakReference& operator= (WeakReference&& other) noexcept { holder = static_cast<SharedRef&&> (other.holder); return *this; } | |||
| #endif | |||
| /** Returns the object that this pointer refers to, or null if the object no longer exists. */ | |||
| @@ -46,13 +46,13 @@ Result& Result::operator= (const Result& other) | |||
| #if JUCE_COMPILER_SUPPORTS_MOVE_SEMANTICS | |||
| Result::Result (Result&& other) noexcept | |||
| : errorMessage (static_cast <String&&> (other.errorMessage)) | |||
| : errorMessage (static_cast<String&&> (other.errorMessage)) | |||
| { | |||
| } | |||
| Result& Result::operator= (Result&& other) noexcept | |||
| { | |||
| errorMessage = static_cast <String&&> (other.errorMessage); | |||
| errorMessage = static_cast<String&&> (other.errorMessage); | |||
| return *this; | |||
| } | |||
| #endif | |||
| @@ -453,7 +453,7 @@ private: | |||
| const int numToSend = jmin (1024, (int) (requestHeader.getSize() - totalHeaderSent)); | |||
| if (send (socketHandle, static_cast <const char*> (requestHeader.getData()) + totalHeaderSent, (size_t) numToSend, 0) != numToSend) | |||
| if (send (socketHandle, static_cast<const char*> (requestHeader.getData()) + totalHeaderSent, (size_t) numToSend, 0) != numToSend) | |||
| return false; | |||
| totalHeaderSent += (size_t) numToSend; | |||
| @@ -178,7 +178,7 @@ String SystemStats::getCpuVendor() | |||
| SystemStatsHelpers::doCPUID (dummy, vendor[0], vendor[2], vendor[1], 0); | |||
| return String (reinterpret_cast <const char*> (vendor), 12); | |||
| return String (reinterpret_cast<const char*> (vendor), 12); | |||
| #else | |||
| return String(); | |||
| #endif | |||
| @@ -60,10 +60,10 @@ namespace | |||
| template <typename RectangleType> | |||
| static NSRect makeNSRect (const RectangleType& r) noexcept | |||
| { | |||
| return NSMakeRect (static_cast <CGFloat> (r.getX()), | |||
| static_cast <CGFloat> (r.getY()), | |||
| static_cast <CGFloat> (r.getWidth()), | |||
| static_cast <CGFloat> (r.getHeight())); | |||
| return NSMakeRect (static_cast<CGFloat> (r.getX()), | |||
| static_cast<CGFloat> (r.getY()), | |||
| static_cast<CGFloat> (r.getWidth()), | |||
| static_cast<CGFloat> (r.getHeight())); | |||
| } | |||
| // These hacks are a workaround for newer Xcode builds which by default prevent calls to these objc functions.. | |||
| @@ -162,7 +162,7 @@ struct ObjCClass | |||
| { | |||
| void* v = nullptr; | |||
| object_getInstanceVariable (self, name, &v); | |||
| return static_cast <Type> (v); | |||
| return static_cast<Type> (v); | |||
| } | |||
| Class cls; | |||
| @@ -191,7 +191,7 @@ void NamedPipe::close() | |||
| char buffer[1] = { 0 }; | |||
| ssize_t done = ::write (pimpl->pipeIn, buffer, 1); | |||
| (void) done; | |||
| ignoreUnused (done); | |||
| ScopedWriteLock sl (lock); | |||
| pimpl = nullptr; | |||
| @@ -224,11 +224,11 @@ bool NamedPipe::openInternal (const String& pipeName, const bool createPipe, boo | |||
| int NamedPipe::read (void* destBuffer, int maxBytesToRead, int timeOutMilliseconds) | |||
| { | |||
| ScopedReadLock sl (lock); | |||
| return pimpl != nullptr ? pimpl->read (static_cast <char*> (destBuffer), maxBytesToRead, timeOutMilliseconds) : -1; | |||
| return pimpl != nullptr ? pimpl->read (static_cast<char*> (destBuffer), maxBytesToRead, timeOutMilliseconds) : -1; | |||
| } | |||
| int NamedPipe::write (const void* sourceBuffer, int numBytesToWrite, int timeOutMilliseconds) | |||
| { | |||
| ScopedReadLock sl (lock); | |||
| return pimpl != nullptr ? pimpl->write (static_cast <const char*> (sourceBuffer), numBytesToWrite, timeOutMilliseconds) : -1; | |||
| return pimpl != nullptr ? pimpl->write (static_cast<const char*> (sourceBuffer), numBytesToWrite, timeOutMilliseconds) : -1; | |||
| } | |||