Skip to content

Commit

Permalink
- remove warnings on Windows
Browse files Browse the repository at this point in the history
- fixed autocomplete being deactivated by an idiot in the last commits
  • Loading branch information
christoph-hart committed Sep 30, 2024
1 parent 71af017 commit c1bc03f
Show file tree
Hide file tree
Showing 24 changed files with 37 additions and 100 deletions.
2 changes: 1 addition & 1 deletion currentGitHash.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6cdf5de799ddc4f796aca7d242a990dfef10b733
71af017983d5821bddf3898cc6215ce55ac88de3
8 changes: 0 additions & 8 deletions hi_backend/backend/BackendEditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1231,10 +1231,6 @@ void MainTopBar::togglePopup(PopupType t, bool shouldShow)
ft->setSize(content->getContentWidth(), content->getContentHeight());

c = new OwningComponent(ft);

int w = (int)((float)content->getContentWidth()*scaleFactor);
int h = (int)((float)content->getContentHeight()*scaleFactor);

c->setName("Interface Preview");

content->interfaceSizeBroadcaster.addListener(*c, [mc](Component& oc, int w, int h)
Expand All @@ -1249,11 +1245,7 @@ void MainTopBar::togglePopup(PopupType t, bool shouldShow)
oc.setSize(w, h);
oc.resized();
});


}


}
else
{
Expand Down
4 changes: 3 additions & 1 deletion hi_backend/backend/BackendToolbar.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,10 @@ class MainToolbarFactory: public PathFactory

};

struct ImporterBase: public hlac::HlacArchiver::Listener
class ImporterBase: public hlac::HlacArchiver::Listener
{
public:

ImporterBase(BackendRootWindow* bpe_):
bpe(bpe_),
ok(Result::ok())
Expand Down
2 changes: 1 addition & 1 deletion hi_backend/backend/currentGit.h
Original file line number Diff line number Diff line change
@@ -1 +1 @@
#define PREVIOUS_HISE_COMMIT "6cdf5de799ddc4f796aca7d242a990dfef10b733"
#define PREVIOUS_HISE_COMMIT "71af017983d5821bddf3898cc6215ce55ac88de3"
2 changes: 1 addition & 1 deletion hi_backend/backend/debug_components/ProcessorCollection.h
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ class SearchableListComponent: public Component,

void mouseDown(const MouseEvent& e)
{
editor.setText("", sendNotificationAsync);
editor.setText("", true);

}

Expand Down
1 change: 0 additions & 1 deletion hi_backend/backend/dialog_library/dialog_library.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -698,7 +698,6 @@ var NewProjectCreator::onTemplateSelector(const var::NativeFunctionArgs& args)

var NewProjectCreator::initFolder(const var::NativeFunctionArgs& args)
{
auto chain = bpe->getBackendProcessor()->getMainSynthChain();
auto& sd = dynamic_cast<GlobalSettingManager*>(bpe->getBackendProcessor())->getSettingsObject();
auto s = sd.getSetting(HiseSettings::Compiler::DefaultProjectFolder).toString();
jassert(s.isNotEmpty());
Expand Down
4 changes: 3 additions & 1 deletion hi_backend/backend/dialog_library/dialog_library.h
Original file line number Diff line number Diff line change
Expand Up @@ -160,10 +160,12 @@ struct ReleaseStartOptionDialog: public multipage::EncodedDialogBase
Component* root;
};

struct NewProjectCreator: public ImporterBase,
class NewProjectCreator: public ImporterBase,
public multipage::EncodedDialogBase

{
public:

NewProjectCreator(hise::BackendRootWindow* bpe_);

void bindCallbacks() override
Expand Down
6 changes: 0 additions & 6 deletions hi_backend/backend/dialog_library/snippet_browser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,6 @@ var SnippetBrowser::rebuildTable(const var::NativeFunctionArgs& args)
auto kv = StringArray::fromTokens(ml[j], ":", "");
auto key = kv[0];

auto isDate = key == "date";

if(key.isEmpty())
continue;

Expand Down Expand Up @@ -396,12 +394,8 @@ var SnippetBrowser::initAddPage(const var::NativeFunctionArgs& args)
{
auto isEdit = (bool)readState("editButton");



writeState("saveFileButton", 0);

auto originalIndex = (int)readState("snippetList");

if(!isEdit)
{
writeState("newName", "");
Expand Down
6 changes: 5 additions & 1 deletion hi_backend/snex_workbench/WorkbenchProcessor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -501,10 +501,14 @@ void DspNetworkCompileExporter::run()

auto ok = codeDestDir.getChildFile(code_path).copyFileTo(realCodeDestDir.getChildFile(code_path));

if (code_path.size() > 0)
if (code_path.size() > 0 && ok)
{
DBG("Wrote code file to " + code_path);
}
else
{
DBG("Writing generated code failed.");
}
}

#endif // HISE_INCLUDE_FAUST_JIT
Expand Down
2 changes: 2 additions & 0 deletions hi_core/hi_dsp/plugin_parameter/PluginParameterProcessor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,8 @@ bool PluginParameterAudioProcessor::isBusesLayoutSupported(const BusesLayout& la
auto inputs = layouts.getMainInputChannels();
auto outputs = layouts.getMainOutputChannels();

ignoreUnused(inputs, outputs);

#if HISE_MIDIFX_PLUGIN
return inputs == 0 && outputs == 0;
#endif
Expand Down
1 change: 0 additions & 1 deletion hi_core/hi_modules/effects/editors/DelayEditor.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ class DelayEditor : public ProcessorEditorBody,
//[UserMethods] -- You can add your own custom methods in this section.
void updateGui()
{
const bool isSynced = leftTimeSlider->getRange().getRange() == HiSlider::getRangeForMode(HiSlider::Mode::TempoSync).getRange();
const bool shouldBeSynced = tempoSyncButton->getToggleState();


Expand Down
2 changes: 0 additions & 2 deletions hi_lac/hlac/SampleBuffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -344,8 +344,6 @@ class HiseSampleBuffer
applyGainRamp(channelIndex, startOffset, rampLength, startGain, endGain);
else
{
bool fadeIn = endGain > startGain;

jassert(getNumSamples() >= rampLength);
jassert(getNumChannels() == 2);

Expand Down
4 changes: 0 additions & 4 deletions hi_scripting/scripting/api/ScriptComponentWrappers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3332,10 +3332,6 @@ void ScriptCreatedComponentWrapper::ValuePopup::updateText()
{
auto thisText = parent.getTextForValuePopup();

auto sf = UnblurryGraphics::getScaleFactorForComponent(parent.getComponent(), false);

//setTransform(AffineTransform::scale(sf));

if(auto laf = dynamic_cast<ScriptingObjects::ScriptedLookAndFeel::CSSLaf*>(&parent.getComponent()->getLookAndFeel()))
{
auto area = laf->getValueLabelSize(*this, *parent.getComponent(), thisText);
Expand Down
2 changes: 1 addition & 1 deletion hi_scripting/scripting/components/PopupEditors.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ struct JavascriptLanguageManager : public mcl::LanguageManager
ADD_HS_SNIPPET("timer (...)", "const var $TIMER_VAR$ = Engine.createTimerObject();\n\n$TIMER_VAR$.setTimerCallback(function()\n{\n\t$// timer callback$\n});\n\n$TIMER_VAR$.startTimer($30$);\n",
"A code snippet that will create a UI timer definition with a callback and a default period of 30Hz");

ADD_HS_SNIPPET("css_inline (...)", "const var $UI_CONTROL$_laf = Content.createLocalLookAndFeel();\n\$UI_CONTROL$_laf.setInlineStyleSheet(\"#$UI_CONTROL$ {\n background-color: blue;\n color: white;\n}\n\n#$UI_CONTROL$:hover {\n background-color: red;\n}\");\n\nContent.getComponent(\"$UI_CONTROL$\").setLocalLookAndFeel($UI_CONTROL$_laf);\n",
ADD_HS_SNIPPET("css_inline (...)", "const var $UI_CONTROL$_laf = Content.createLocalLookAndFeel();\n$UI_CONTROL$_laf.setInlineStyleSheet(\"#$UI_CONTROL$ {\n background-color: blue;\n color: white;\n}\n\n#$UI_CONTROL$:hover {\n background-color: red;\n}\");\n\nContent.getComponent(\"$UI_CONTROL$\").setLocalLookAndFeel($UI_CONTROL$_laf);\n",
"A code snippet that will create a LAF class with an inline CSS style sheet that can be applied to a UI control using its id selector. \n>Use `Ctrl+D` for selecting all `UI_CONTROL` tokens and rename it to the control ID");

#undef ADD_HS_SNIPPET
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -342,8 +342,6 @@ var HiseJavascriptEngine::RootObject::FunctionCall::getResult(const Scope& s) co

if (ConstScriptingObject* c = dynamic_cast<ConstScriptingObject*>(thisObject.getObject()))
{
auto numExpectedArgs = arguments.size();

c->getIndexAndNumArgsForFunction(dot->child, functionIndex, numArgs);

#if ENABLE_SCRIPTING_SAFE_CHECKS
Expand Down
28 changes: 0 additions & 28 deletions hi_scripting/scripting/scriptnode/ui/NodeComponent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,34 +38,6 @@ using namespace hise;
juce::String NodeComponent::Header::getPowerButtonId(bool getOff) const
{
return "on";

auto path = parent.node->getValueTree()[PropertyIds::FactoryPath].toString();

if (path.startsWith("container."))
{
path = path.fromFirstOccurrenceOf("container.", false, false);

if (getOff)
{
if (path.contains("frame") ||
path.contains("oversample") ||
path.contains("midi") ||
path.startsWith("fix"))
return "chain";
else
return "on";
}
else
{
if (path == "soft_bypass" ||
path == "offline")
return "on";

return path;
}
}

return "on";
}


Expand Down
4 changes: 1 addition & 3 deletions hi_streaming/hi_streaming/StreamingSamplerSound.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -843,8 +843,6 @@ void StreamingSamplerSound::fillSampleBuffer(hlac::HiseSampleBuffer &sampleBuffe
if (sampleBuffer.getNumSamples() == samplesToCopy)
sampleBuffer.clearNormalisation({});

auto isEntireSampleWithLoopReleasePlay = entireSampleLoaded && isLoopEnabled() && isReleaseStartEnabled();

if (!fileReader.isUsed() && !isEntireSampleLoaded()) return;

int thisLoopStart = getLoopStart(isReversed());
Expand All @@ -865,7 +863,7 @@ void StreamingSamplerSound::fillSampleBuffer(hlac::HiseSampleBuffer &sampleBuffe

if (smallLoopBuffer != nullptr)
{
int numSamplesBeforeFirstWrap = 0;
int numSamplesBeforeFirstWrap;

if (indexInLoop < 0)
{
Expand Down
2 changes: 0 additions & 2 deletions hi_streaming/hi_streaming/StreamingSamplerSound.h
Original file line number Diff line number Diff line change
Expand Up @@ -645,8 +645,6 @@ class StreamingSamplerSound : public SynthesiserSound

lastValue = value;
}

int x = 5;
}

std::vector<std::pair<int, float>> zeroCrossingIndexes;
Expand Down
5 changes: 1 addition & 4 deletions hi_tools/hi_multipage/ActionComponents.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2035,8 +2035,6 @@ void UnzipTask::createEditor(Dialog::PageInfo& rootList)

Result CopyAsset::performTaskStatic(WaitJob& t)
{
bool overwrite = true;

if(auto a = t.getState().getAsset(t.getInfoObject(), mpid::Source))
{
String fn;
Expand Down Expand Up @@ -2867,8 +2865,7 @@ Result HiseActivator::performTaskStatic(WaitJob& t)
{
URL u(*url);

auto ms = Time::getMillisecondCounter();
std::unique_ptr<InputStream> in(u.createInputStream(false, nullptr, nullptr, String(), 3000, nullptr));
auto in = u.createInputStream(false, nullptr, nullptr, String(), 3000, nullptr);

if (in != nullptr)
return true;
Expand Down
4 changes: 3 additions & 1 deletion hi_tools/hi_multipage/State.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1211,7 +1211,7 @@ var MonolithData::getJSON() const
{
auto numToRead = input->readInt64();
MemoryBlock mb;
auto numRead = input->readIntoMemoryBlock(mb, numToRead);
auto numRead = (int64)input->readIntoMemoryBlock(mb, numToRead);

if(numRead == numToRead)
{
Expand All @@ -1230,6 +1230,8 @@ var MonolithData::getJSON() const
else
throw String("Failed to read " + String(numToRead) + " bytes");
}

return var();
}

void HardcodedDialogWithState::setOnCloseFunction(const std::function<void()>& f)
Expand Down
2 changes: 0 additions & 2 deletions hi_tools/mcl_editor/code_editor/TextEditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,6 @@ void TextEditor::timerCallback()

void TextEditor::setNewTokenCollectionForAllChildren(Component* any, const Identifier& languageId, TokenCollection::Ptr newCollection)
{
return;

if(newCollection == nullptr)
newCollection = new TokenCollection(languageId);

Expand Down
40 changes: 13 additions & 27 deletions hi_tools/simple_css/Animator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -248,33 +248,19 @@ void StateWatcher::checkChanges(Component* c, StyleSheet::Ptr ss, int currentSta
i->resetWaitCounter();

// just a switch between the start and end state
auto stateToggle = currentState == i->startValue.state.stateFlag ||
(i->reverse && currentState == i->endValue.state.stateFlag);

if(false)
{
i->reverse = !i->reverse;
i->updateCurrentRange();

found = true;
break;
}
else
{
auto tv = ss->getTransitionValue(i->endValue);

i->currentProgress = 0.0;
i->reverse = false;

String m;
m << tv.startValue << "~" << tv.endValue << "~" << String(tv.progress, 3);

i->intermediateStartValue = m;
i->endValue.state.stateFlag = currentState;
i->transitionData = thisTransition;
found = true;
break;
}
auto tv = ss->getTransitionValue(i->endValue);

i->currentProgress = 0.0;
i->reverse = false;

String m;
m << tv.startValue << "~" << tv.endValue << "~" << String(tv.progress, 3);

i->intermediateStartValue = m;
i->endValue.state.stateFlag = currentState;
i->transitionData = thisTransition;
found = true;
break;
}
}

Expand Down
3 changes: 1 addition & 2 deletions hi_tools/simple_css/CSSLookAndFeel.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,7 @@ using namespace juce;
* - popup menus
*
*/
struct StyleSheetLookAndFeel: public GlobalHiseLookAndFeel,
public ScrollBar::LookAndFeelMethods
struct StyleSheetLookAndFeel: public GlobalHiseLookAndFeel
{
ScrollbarFader::Laf fallback;

Expand Down
1 change: 1 addition & 0 deletions hi_tools/simple_css/CssParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1148,6 +1148,7 @@ float ExpressionParser::evaluate(const String& expression, const Context<>& cont
}
catch(Result& r)
{
ignoreUnused(r);
DBG(r.getErrorMessage());
return context.defaultFontSize;
}
Expand Down

0 comments on commit c1bc03f

Please sign in to comment.