Issue 17827 - IRIX: svx: The initial value of a reference to a non-const must be an lvalue.
Summary: IRIX: svx: The initial value of a reference to a non-const must be an lvalue.
Status: CLOSED WONT_FIX
Alias: None
Product: porting
Classification: Code
Component: code (show other issues)
Version: OOo 1.1 RC
Hardware: SGI IRIX
: P3 Trivial (vote)
Target Milestone: AOO PleaseHelp
Assignee: sander_traveling
QA Contact: issues@porting
URL:
Keywords:
Depends on:
Blocks: 809
  Show dependency tree
 
Reported: 2003-08-04 00:16 UTC by nickb
Modified: 2010-03-29 20:55 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description nickb 2003-08-04 00:16:40 UTC
CC -c -I.  -I. -I../inc -I../../inc -I../../unx/inc -I../../unxirxm3.pro/inc -I.
-I/build1/nickb/openoffice/workarea/11rc/oo_1.1rc_src/solver/645/unxirxm3.pro/inc/stl
-I/build1/nickb/openoffice/workarea/11rc/oo_1.1rc_src/solver/645/unxirxm3.pro/inc/external
-I/build1/nickb/openoffice/workarea/11rc/oo_1.1rc_src/solver/645/unxirxm3.pro/inc
-I/build1/nickb/openoffice/workarea/11rc/oo_1.1rc_src/solenv/unxirxm3/inc
-I/build1/nickb/openoffice/workarea/11rc/oo_1.1rc_src/solenv/inc
-I/build1/nickb/openoffice/workarea/11rc/oo_1.1rc_src/res
-I/build1/nickb/openoffice/workarea/11rc/oo_1.1rc_src/solver/645/unxirxm3.pro/inc/stl
-I/build1/nickb/openoffice/workarea/11rc/oo_1.1rc_src/solenv/inc/Xp31
-I/usr/java2/include -I/usr/java2/include/irix
-I/usr/java2/include/native_threads/include     -I. -I../../res -I. -O2  
-DDG_DLL -LANG:ansi-for-init-scope=OFF -LANG:std -LANG:libc_in_namespace_std=ON
-LANG:exceptions=OFF   -KPIC -DIRIX -DUNX -DVCL -DC730 -DC730 -DMIPS -DCVER=C730
-D_USE_NAMESPACE -DSTLPORT_VERSION=0x450 -D_USE_NAMESPACE=1 -DNEW_SOLAR
-DSGI_STL -D__STL_THROW_RANGE_ERRORS -D__DMAKE -DUNIX -DCPPU_ENV=MipsPro
-DSUPD=645 -DBUILD=8639 -DPRODUCT -DNDEBUG -DPRODUCT_FULL -DOSL_DEBUG_LEVEL=0
-DOPTIMIZE -DEXCEPTIONS_OFF -DCUI -DSOLAR_JAVA -DSRX645  -DSHAREDLIB -D_DLL_ 
-DMULTITHREAD  -w -o ../../unxirxm3.pro/slo/srchdlg.o
/build1/nickb/openoffice/workarea/11rc/oo_1.1rc_src/svx/source/dialog/srchdlg.cxx
cc-1440 CC: ERROR File =
/build1/nickb/openoffice/workarea/11rc/oo_1.1rc_src/svx/source/dialog/srchdlg.cxx,
Line = 585
  The initial value of a reference to a non-const must be an lvalue.

        INT32 &rFlags = (INT32) nTransliterationFlags;
                        ^
Comment 1 nickb 2003-08-04 05:13:18 UTC
The source looks like this:

INT32 SvxSearchDialog::GetTransliterationFlags() const
{
        INT32 &rFlags = (INT32) nTransliterationFlags;
    if (!aMatchCaseCB.IsChecked())
                rFlags |=  TransliterationModules_IGNORE_CASE;
        else
                rFlags &= ~TransliterationModules_IGNORE_CASE;
    if ( !aJapMatchFullHalfWidthCB.IsChecked())
                rFlags |=  TransliterationModules_IGNORE_WIDTH;
        else
                rFlags &= ~TransliterationModules_IGNORE_WIDTH;
        return nTransliterationFlags;
}

I think (and I could be wrong) that this is bad C++. The function is
marked const, yet it changes nTransliterationFlags. I have changed
rFlags so its not a refence, and changed the function to return rFlags.

If someone was relying on nTransliterationFlags changing after a call
to this function, then this change will break that. However, it is
not compliant C++ the way it is. 
Comment 2 Martin Hollmichel 2003-08-07 15:56:12 UTC
set target milestone to 1.1.1
Comment 3 Martin Hollmichel 2003-10-17 08:21:08 UTC
reassigned.
Comment 4 sander_traveling 2003-12-04 04:17:36 UTC
retarget to 2.0 
Comment 5 caolanm 2010-03-29 20:55:39 UTC
per issue 106845 sb removed the partial irix port, so this doesn't make sense in
isolation anymore
Comment 6 caolanm 2010-03-29 20:55:54 UTC
closing