uPlexa / uplexa

uPlexa: Incentivizing the mass compute power of IoT devices to form a means of anonymous blockchain payments.
https://uplexa.com
Other
48 stars 23 forks source link

Compile Error [-Werror=misleading-indentation] #74

Closed Foxi3 closed 3 years ago

Foxi3 commented 3 years ago

https://github.com/uPlexa/uplexa/blob/be3408e80aea542213c61ac922886389eb8420cc/src/simplewallet/simplewallet.cpp#L7935-L7950

Encounter error on compiling

/uplexa/src/simplewallet/simplewallet.cpp:7935:9: error: this ‘if’ clause does not guard... [-Werror=misleading-indentation]
         if (i->second.m_double_spend_seen)
         ^~
/home/foxi3/uplexa/src/simplewallet/simplewallet.cpp:7937:11: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
           transfers.push_back({
           ^~~~~~~~~

fix by move this block of code one tab to the left

          transfers.push_back({
            tr("pool"),
            pd.m_timestamp,
            tools::pay_type::in,
            false, // confirmed
            false, // unlocked
            pd.m_amount,
            pd.m_tx_hash,
            payment_id,
            0,
            {{"-", pd.m_amount}},
            {pd.m_subaddr_index.minor},
            note + double_spend_note
          });
QuantumLeaper commented 3 years ago

Cheers :+1: